Example #1
0
        private void DGV_Registration_DoubleClick(object sender, EventArgs e)
        {
            if (DGV_Registration.SelectedRows.Count == 0)
            {
                return;
            }

            Com_NameS.Text    = DGV_Registration.CurrentRow.Cells[1].Value.ToString();
            Com_NameC.Text    = DGV_Registration.CurrentRow.Cells[2].Value.ToString();
            DTP_history.Value = Convert.ToDateTime(DGV_Registration.CurrentRow.Cells[3].Value.ToString());

            string cause = this.DGV_Registration.CurrentRow.Cells[5].Value.ToString();

            if (cause == "المبلغ الافتراضي")
            {
                RadBtn_Cost.Checked = true;
            }
            else
            {
                RadBtn_SepicalC.Checked = true;
                RText_SpecialC.Text     = this.DGV_Registration.CurrentRow.Cells[4].Value.ToString();
                RText_Cause.Text        = this.DGV_Registration.CurrentRow.Cells[5].Value.ToString();
            }

            DGV_Registration.ClearSelection();
            Btn_Update.Enabled = true;
            Enable_BtnAdd      = false;
            Btn_Add.Enabled    = false;
        }
Example #2
0
 private void Frm_Registration_Load(object sender, EventArgs e)
 {
     DGV_Registration.ClearSelection();
     RText_SpecialC.Text = "المبلغ الخاص";
     RText_Cause.Text    = "تبرير السعر";
     Check_DGV_Size();
 }
        private void RText_Search_TextChanged(object sender, EventArgs e)
        {
            DataTable      dt = new DataTable();
            SqlDataAdapter ad = new SqlDataAdapter("select Student_Regisrtation.Id_SR as 'الرقم',Students.Name as 'اسم الطالب',Class.Name as 'اسم الصف',Date_Reg as 'تاريخ التسجيل' ,Value_Reg as 'تكاليف التسجيل',Note_Reg as 'تبرير المبلغ' from Student_Regisrtation inner join Students on Students.Id_S = Student_Regisrtation.Id_S inner join Class on Class.Id_Class=Student_Regisrtation.Id_Class where Students.Name like '%" + RText_Search.Text + "%' or Class.Name like '%" + RText_Search.Text + "%' ", DB.sqlconnection);

            ad.Fill(dt);

            DGV_Registration.DataSource = dt;

            DGV_Registration.ClearSelection();
        }
Example #4
0
        private void RText_Search_TextChanged(object sender, EventArgs e)
        {
            DGV_Registration.DataSource = register.Search_SRegister(RText_Search.Text);

            DGV_Registration.Columns[0].HeaderText = "الرقم";
            DGV_Registration.Columns[1].HeaderText = "اسم الطالب";
            DGV_Registration.Columns[2].HeaderText = "اسم الصف";
            DGV_Registration.Columns[3].HeaderText = "تاريخ التسجيل";
            DGV_Registration.Columns[4].HeaderText = "تكاليف التسجيل";
            DGV_Registration.Columns[5].HeaderText = "تبرير المبلغ";

            DGV_Registration.ClearSelection();
        }
Example #5
0
        private void Btn_Reset_Click(object sender, EventArgs e)
        {
            Btn_Add.Enabled    = true;
            Btn_Update.Enabled = false;

            Com_NameS.SelectedValue = 0;
            Com_NameC.SelectedValue = 0;
            Lbl_Course.Text         = ". . . . .";
            Lbl_Cost.Text           = ". . . . .";
            DTP_history.Value       = Convert.ToDateTime(DateTime.Now);
            RadBtn_Cost.Checked     = true;
            RadBtn_SepicalC.Checked = false;


            DGV_Registration.ClearSelection();
        }