i have this question, but i use two datetimepicker later: dt1 =DateTime .Parse(dateTimePicker11.Value.ToLongDateString()+" "+dateTimePicker12.Value.ToLongTimeString()); it is right.
Sorry ...
i have this question, but i use two datetimepicker later: dt1 =DateTime .Parse(dateTimePicker11.Value.ToLongDateString()+" "+dateTimePicker12.Value.ToLongTimeString()); it is right.
Sorry ...
add row : DataRow dr=dataset.table["tablename"].newrow(); dr["columnname"]="value"; ... dataset.table["tablename"].rows.add(dr); remove row: dataset.table["tablename"].rows[row].remove(); if you want to add more rows from other datatable ,or remove mores rows , you can use while statement to do
Sorry ...
I design a class to DataGridViewComboBoxColumn and OTHERS when u want to bind data , u use : ClassLibrary_Pharm.Class_ComboBindData.u_ComboBindData(dataGridComboBoxColumn,"PersonProperties",SqlConnectionstring); follow is my project code, u can modify it using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Data; namespace ClassLibrary_Pharm { public static class Class_ComboBindData { public static bool u_ComboBindData(object combo, string sTopic) { return u_ComboBindData(combo, sTopic, null); } public static bool u_ComboBindData(object combo, string sTopic, EcareHis.C.Common.His_LogOn Logon) { bool blReturn = false; DataSet ds = null; switch (sTopic.ToLower().Trim()) { case "sex": ds = u_GetSexual(); break; case "stay": ds = u_GetStay(); break; case "readyflag": ds = u_GetConfect(); break; case "department": ds = u_GetDeptEmp(Logon,"epr"); break; case "code213": ds = u_GetCodeTable(Logon, "realhis","code213"); break; case "code211": ds = u_GetCodeTable(Logon, "realhis", "code211"); break; case "code212": ds = u_GetCodeTable(Logon, "realhis", "code212"); break; } if (ds == null) throw new Exception("not rows" + sTopic); if (ds.Tables["param"].Rows.Count < 1) throw new Exception("row count < 1" + sTopic); switch (combo.GetType().ToString()) { case "System.Windows.Forms.ComboBox": ((ComboBox)combo).DataSource = ds.Tables["param"]; ((ComboBox)combo).ValueMember = "value"; ((ComboBox)combo).DisplayMember = "mark"; break; case "System.Windows.Forms.DataGridViewComboBoxColumn": ((DataGridViewComboBoxColumn)combo).DataSource = ds.Tables["param"]; ((DataGridViewComboBoxColumn)combo).ValueMember = "value"; ((DataGridViewComboBoxColumn)combo).DisplayMember = "mark";
you can retrieve data from SQL select : select b.name,c.value from syscolumns b, sysobjects A,sysproperties c where a.name ='bed' and a.id=b.id and b.id=c.id and b.colorder=c.smallid then use this rows to modify your datagridview column tex if you can design this, i may design class for you: SetDatagridColumnTextBySqlDescribe(DatagridView dview)
Think ...
private void button3_Click(object sender, EventArgs e) { treeView1.Nodes.Add(LoopThroughControls(this)); } private TreeNode LoopThroughControls(Control c) { TreeNode node = new TreeNode(c.Name); Control ctemp; for(int i=0;iOk ...
Sorry ...
yes, Rows = table.Select("select @@identity"); in Sql Server INSERT INTO jobs (job_desc,min_lvl,max_lvl) VALUES ('Accountant',12,125) SELECT @@IDENTITY AS 'Identity' @@IDENTITY is SQL system variable datatable have very SQL method , So you think dataset like a small SQl server
Agree ...
How do u work with MSN messager and notepad, i want to get your some source code. Please ,Thank u very much
Sorry ...
two databases in same server? Sorry ...
public string st(string st) { for(string st1="";st!=st1;st1=st,st=st1.Replace(" "," ")); return st; } Sorry ...