コード例 #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtEmployeeName.Text != string.Empty)
            {
                #region "                check Employee   existed or not               "

                Employee employee = cmd.GetEmployeeByName(txtEmployeeName.Text);
                if (employee != null)
                {
                    return;
                }


                #endregion ""
                // كمل الكود 
                // او
                // Start Save New Employee//
                _Operation.StartOperation(this);


                Employee tb = new Employee() { EmployeeName = txtEmployeeName .Text,Address=txtAddress.Text,
                                            Email=txtEmail.Text ,IdNumber=txtIDCard.Text,Phone=txtPhone.Text  };
                cmd.NewEmployee(tb);
                _Operation.EndOperation(this);

                MessageBox.Show("Saved ");
            }
        }
コード例 #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (txtEmployeeName.Text != string.Empty)
     {
         Employee emp = new Employee()
         {
             EmployeeName = txtEmployeeName.Text,
             Address = txtAddress.Text,
             IdNumber = txtIDCard.Text,
             Phone = txtPhone.Text,
             Email = txtEmail.Text
         };
         cmd.EditEmployee(emp, TargetEmployee.Id);
         MessageBox.Show("تم التعديل");
         base.Close();
     }
 }
コード例 #3
0
 partial void DeleteEmployee(Employee instance);
コード例 #4
0
 partial void UpdateEmployee(Employee instance);
コード例 #5
0
 partial void InsertEmployee(Employee instance);