public void ButtonX2_Click(object sender, EventArgs e)
        {
            var with_1 = new frm_Employee();

            with_1.btSave.Visible   = false;
            with_1.btEdit.Text      = "ສໍາເລັດ";
            with_1.TabPage2.Visible = false;
            with_1.btDelete.Visible = false;

            with_1.txtEmployeeID.Text       = lbID.Text;
            with_1.txtEmployeeName.Text     = lbName.Text;
            with_1.txtEmployeeLastName.Text = lbLastName.Text;
            with_1.dtbDob.Text               = lbDob.Text;
            with_1.txtEmployeeTel.Text       = lbTel.Text;
            with_1.txtEmployeeParentTel.Text = lbParentTel.Text;
            with_1.txtEmployeeEmail.Text     = lbEmail.Text;
            with_1.txtEmployeeVillage.Text   = lbVillag.Text;
            with_1.txtEmployeeDistrict.Text  = lbDistrict.Text;
            with_1.cbProvince.SelectedItem   = lbProvince.Text;
            with_1.txtEmployeeSalary.Text    = lbSalary.Text;
            with_1.txtEmployeePosition.Text  = lbPosition.Text;
            with_1.ptbProfile.Image          = Image.FromFile(p);
            with_1.txtPicturePath.Text       = p;
            frm_Employee.Default.ShowDialog(this);
        }
        private void ButtonX6_Click(object sender, EventArgs e)
        {
            tmMenuOut.Start();
            frm_Employee emply = new frm_Employee();

            emply.MdiParent = this;
            emply.Show();
            emply.WindowState = FormWindowState.Maximized;
            emply.BringToFront();
            //  pnMenu.SendToBack()
            //  pnMenu.Hide()
        }
        public void ButtonX1_Click(object sender, EventArgs e)
        {
            //  frm_Employee.ShowDialog(Me)
            var with_1 = new frm_Employee();

            with_1.txtEmployeeID.Text = ConstVar.au.SetID(ConstVar.constr, "EmployeeID", "tb_Employee", "EP00", 2, 3);
            with_1.txtEmployeeName.Clear();
            with_1.txtEmployeeLastName.Clear();
            with_1.dtbDob.Text = "";
            with_1.txtEmployeeTel.Clear();
            with_1.txtEmployeeParentTel.Clear();
            with_1.txtEmployeeEmail.Clear();
            with_1.txtEmployeeVillage.Clear();
            with_1.txtEmployeeDistrict.Clear();
            with_1.cbProvince.SelectedItem = lbProvince.Text;
            with_1.txtEmployeeSalary.Clear();
            with_1.txtEmployeePosition.Clear();
            with_1.ptbProfile.Image = null;
            with_1.txtPicturePath.Clear();
            with_1.ShowDialog(this);
        }
Beispiel #4
0
 static void defaultInstance_FormClosed(object sender, FormClosedEventArgs e)
 {
     defaultInstance = null;
 }