private void chkreport_LCH_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); DataTable dt = new DataTable(); CEFCServiceReference.Class_Checking[] t = new CEFCServiceReference.Class_Checking[30]; CEFCServiceReference.Service1Client client = new CEFCServiceReference.Service1Client(); label9.Text = search_LCH.pser.patientNo.ToString(); t = client.FindChecksofPatient(search_LCH.pser.patientNo); if (t[1].remarks == "error") { } else { int n = client.returncheckcounter(); // CEFCServiceReference.Class_Test. dt.Columns.Add("Check Date", typeof(DateTime)); dt.Columns.Add("Doc ID", typeof(int)); dt.Columns.Add("Remarks", typeof(string)); dt.Columns.Add("Fee", typeof(string)); for (int i = 0; i < n; i++) { dt.Rows.Add(new object[] { t[i].checkdate.Date, t[i].docID.ToString(), t[i].remarks.ToString(), t[i].fee.ToString() }); } ds.Tables.Add(dt); dataGridView1.DataSource = ds; dataGridView1.DataMember = dt.TableName; dataGridView1.Show(); } }
private void check_LCH_Load(object sender, EventArgs e) { cc = new CEFCServiceReference.Class_Checking(); pno.Text = search_LCH.pser.patientNo.ToString(); }