Ejemplo n.º 1
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            frm_add_department frm = new frm_add_department();

            frm.Text = "اضافة قسم جديد";
            frm.Name = "add_dep";
            frm.txt_DeptCode.Text = cls_validate.increasekey(dep_code, 4);
            frm.ShowDialog();
            this.frm_department_Load(sender, e);
        }
Ejemplo n.º 2
0
        private void btn_edit_Click(object sender, EventArgs e)
        {
            frm_add_department frm = new frm_add_department();

            frm.Text = "تعديل قسم جديد";
            frm.Name = "update_dep";
            frm.txt_DeptCode.Text   = dgv_department.CurrentRow.Cells[0].Value.ToString();
            frm.txt_DEPTname.Text   = dgv_department.CurrentRow.Cells[1].Value.ToString();
            frm.txtDEPTplace.Text   = dgv_department.CurrentRow.Cells[2].Value.ToString();
            frm.txt_DEPT_notes.Text = dgv_department.CurrentRow.Cells[3].Value.ToString();
            frm.ShowDialog();
            this.frm_department_Load(sender, e);
        }
Ejemplo n.º 3
0
        private void dgv_department_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frm_add_department frm = new frm_add_department();

            frm.txt_DeptCode.Text    = dgv_department.CurrentRow.Cells[0].Value.ToString();
            frm.txt_DEPTname.Text    = dgv_department.CurrentRow.Cells[1].Value.ToString();
            frm.txtDEPTplace.Text    = dgv_department.CurrentRow.Cells[2].Value.ToString();
            frm.txt_DEPT_notes.Text  = dgv_department.CurrentRow.Cells[3].Value.ToString();
            frm.panel1.Enabled       = false;
            frm.ts_btn_save.Visible  = false;
            frm.ts_btn_clear.Visible = false;
            frm.ShowDialog();
            this.frm_department_Load(sender, e);
        }