Title: MySearch()                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
private void MySearch()
        {   //  WHERE     (Date0 BETWEEN `1/1/2007` AND `1/1/2009`) AND (Nationalty = `nnn`) AND (Sex = `male`) AND (AdmitLocation = `bbbb`)
            this.hospitalDataSet.resabtion.Clear();
            MyQary = "SELECT Id, UserId, PatNo, Date0, Name, AgeYear, AgeMounth, Sex, Adress, Source, Nationalty, ModeOfArrival, AdmitLocation, DiagnosisOnArrival, UserName, t1, t2, t3, no1 FROM dbo.resabtion";
            string Where1 = " WHERE ( Date0 BETWEEN `" + dateTimePicker1.Value.Date.ToString(" yyyy-MM-dd") + "` AND `" + dateTimePicker2.Value.Date.AddDays(1).ToString(" yyyy-MM-dd ") + "`) ";
            if (comboBox1.SelectedIndex != 0)
            {//(Nationalty = N`سعودي`)
                Where1 += " AND (Nationalty = N`" + comboBox1.Text + "`)";
            }
            if (gender1 != "All")
            {
                Where1 += " AND (Sex = `" + gender1 + "`)";
            }
            if (Admitlocation != "All")
            {
                Where1 += " AND (AdmitLocation = `" + Admitlocation + "`)";
            }
            MyQary += Where1;
            //        MessageBox.Show(MyQary);
            System.Data.SqlClient.SqlDataAdapter adptor = new System.Data.SqlClient.SqlDataAdapter(MyQary, Hospital.Properties.Settings.Default.HospitalConnectionString);
            adptor.Fill(this.hospitalDataSet.resabtion);
 
        }