Example #1
0
        private void RadBtn_History_CheckedChanged(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = appointment.Search_ByHistory(DTP1.Value, DTP2.Value);
            DGV_Appointment.DataSource = dt;
            DGV_Appointment.ClearSelection();
        }
Example #2
0
        private void RadBtn_Day_CheckedChanged(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = appointment.Search_BYDAy(DateTime.Now);
            DGV_Appointment.DataSource = dt;
            DGV_Appointment.ClearSelection();
        }
Example #3
0
        private void RText_Search_TextChanged(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = appointment.Search_Appointment(RText_Search.Text);
            DGV_Appointment.DataSource = dt;
            DGV_Appointment.ClearSelection();
        }
Example #4
0
        private void ChkBox_Appintment_CheckedChanged(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt = appointment.Search_ByBooking(ChkBox_Appintment.Checked);
            DGV_Appointment.DataSource = dt;

            DGV_Appointment.ClearSelection();
        }
Example #5
0
        private void Appointment_Load(object sender, EventArgs e)
        {
            Com_Paient.ResetText();
            Com_Paient.ForeColor = Color.Gray;
            Com_Paient.Text      = "اختيار";
            Com_Paient.Focus();

            Com_Doctors.ResetText();
            Com_Doctors.ForeColor = Color.Gray;
            Com_Doctors.Text      = "اختيار";
            DGV_Appointment.ClearSelection();

            DTP_history.MinDate = Convert.ToDateTime(DateTime.Now.ToString("dd / MM / yyyy"));

            timer1.Start();
        }
Example #6
0
        private void DGV_Appointment_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                if (DGV_Appointment.SelectedRows.Count == 0)
                {
                    return;
                }

                Com_Type.Text   = this.DGV_Appointment.CurrentRow.Cells[3].Value.ToString();
                Com_Paient.Text = this.DGV_Appointment.CurrentRow.Cells[2].Value.ToString();

                bool Status = Convert.ToBoolean(this.DGV_Appointment.CurrentRow.Cells[4].Value.ToString());

                if (Status == true)
                {
                    RBtn_Wait.Checked = true;
                }
                else
                {
                    RBtn_Finished.Checked = true;
                }


                DTP_history.Value = Convert.ToDateTime(this.DGV_Appointment.CurrentRow.Cells[6].Value.ToString());
                DTP_time.Value    = Convert.ToDateTime(this.DGV_Appointment.CurrentRow.Cells[7].Value.ToString());
                Com_Doctors.Text  = this.DGV_Appointment.CurrentRow.Cells[5].Value.ToString();

                DGV_Appointment.ClearSelection();
                Btn_Update.Enabled = true;
                Enable_BtnAdd      = false;
                Btn_Add.Enabled    = false;

                Com_Doctors.ForeColor = Color.Black;
                Com_Paient.ForeColor  = Color.Black;
            }
            catch (Exception ex) { }
        }
Example #7
0
        private void Btn_New_Click(object sender, EventArgs e)
        {
            Com_Paient.DropDownStyle = ComboBoxStyle.DropDown;
            Btn_Add.Enabled          = true;
            Btn_Update.Enabled       = false;

            Com_Paient.ForeColor  = Color.Gray;
            Com_Doctors.ForeColor = Color.Gray;
            Com_Paient.Text       = "اختيار";
            Com_Paient.Focus();

            Com_Doctors.Text = "اختيار";
            Com_Type.Text    = "اختيار";


            DTP_time.Value      = Convert.ToDateTime(DateTime.Now);
            DTP_history.MinDate = Convert.ToDateTime(DateTime.Now.ToString("dd / MM / yyyy"));

            DTP_history.Value = Convert.ToDateTime(DateTime.Now);

            RBtn_Wait.Checked     = true;
            RBtn_Finished.Checked = false;
            DGV_Appointment.ClearSelection();
        }