private void frmPatientList_Load(object sender, EventArgs e) { PatientComplainBusiness _bll = new PatientComplainBusiness(); dgvPatient.DataSource = _bll.getPatientList(); listmodel1 = _bll.getPatientList(); dgvPatient.Columns[0].Visible = false; dgvPatient.Columns[1].Visible = false; dgvPatient.Columns[2].Visible = false; dgvPatient.Columns[6].Visible = false; dgvPatient.Columns[10].Visible = false; dgvPatient.Columns[3].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[4].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[5].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[7].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[8].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[9].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[11].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[12].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); dgvPatient.Columns[13].HeaderCell.Style.Font = new Font("Franklin Gothic Book", 10, FontStyle.Bold); if (!System.Windows.Forms.SystemInformation.TerminalServerSession) { Type dgvType = dgvPatient.GetType(); PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); pi.SetValue(dgvPatient, true, null); } }
private void btnRefresh_Click(object sender, EventArgs e) { PatientComplainBusiness _bll = new PatientComplainBusiness(); Cursor = Cursors.WaitCursor; dgvPatient.DataSource = _bll.getPatientList(); Cursor = Cursors.WaitCursor; //dgvPatient.Columns[0].Visible = false; //dgvPatient.Columns[1].Visible = false; //dgvPatient.Columns[2].Visible = false; //dgvPatient.Columns[6].Visible = false; //dgvPatient.Columns[10].Visible = false; }
public void savePatientComp() { PatientComplainBusiness _bll = new PatientComplainBusiness(); var ds = new PatientComplaintModel(); ds.ConsultatonId = Guid.NewGuid().ToString(); ds.LastName = "Guardian"; ds.FirstName = "Kristine"; ds.Complaints = "Head Ache,Migraine"; ds.CreatedDate = DateTime.Now; ds.CreatedBy = "Patient"; ds.Agree = true; _bll.SavePatientComplaint(ds); Assert.AreEqual(true, true); }
private void btnSearch_Click(object sender, EventArgs e) { try { PatientComplainBusiness _bll = new PatientComplainBusiness(); DataTable utility = Class.clsUtility.ToDataTable(_bll.getPatientList()); dgvPatient.DataSource = utility; listmodel1 = _bll.getPatientList(); (dgvPatient.DataSource as DataTable).DefaultView.RowFilter = string.Format("EmpName LIKE '%{0}%'", txtSearch.Text); (dgvPatient.DataSource as DataTable).DefaultView.ToTable(); } catch (Exception ex) { MessageBox.Show("Invalid search" + " " + ex.Message, "OCMS", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }