Example #1
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            //كود المريضة
            if (comboCriteria.SelectedIndex == 0)
            {
                VisitsDetailsLogic.SearchButton(dataGridView1, txtSearch, "code", false, dtpFrom.Value.ToString("yyyy-MM-dd"), dtpTo.Value.ToString("yyyy-MM-dd"));
                ShowNumberOfVisits();
            }
            //اسم المريضة
            if (comboCriteria.SelectedIndex == 1)
            {
                VisitsDetailsLogic.SearchButton(dataGridView1, txtSearch, "name", false, dtpFrom.Value.ToString("yyyy-MM-dd"), dtpTo.Value.ToString("yyyy-MM-dd"));
                ShowNumberOfVisits();
            }

            //هاتف المريضة
            if (comboCriteria.SelectedIndex == 2)
            {
                VisitsDetailsLogic.SearchButton(dataGridView1, txtSearch, "phone", false, dtpFrom.Value.ToString("yyyy-MM-dd"), dtpTo.Value.ToString("yyyy-MM-dd"));
                ShowNumberOfVisits();
            }
        }
Example #2
0
 private void TxtSearch_TextChanged(object sender, EventArgs e)
 {
     VisitsDetailsLogic.SearchButton(dataGridView1, txtSearch, "", true, dtpFrom.Value.ToString("yyyy-MM-dd"), dtpTo.Value.ToString("yyyy-MM-dd"));
     ShowNumberOfVisits();
 }