Esempio n. 1
0
        private void LoadData()
        {
            Employee entity = new Employee();
            if (mode == ObjectState.Edit && !string.IsNullOrEmpty(keyCode))
            {
                entity.employee_id = Converts.ParseLong(keyCode);
                entity = ServiceProvider.EmployeeService.FindByKeys(entity, true);

                txtEmployeeNo.Text = entity.employee_no;
                txtFirstName.Text = entity.first_name;
                txtMidName.Text = entity.mid_name;
                txtLastName.Text = entity.last_name;
                txtUserName.Text = entity.user_name;
                txtPassword.Text = entity.user_password;
            }
            else
            {
                txtEmployeeNo.Text = string.Empty;
                txtFirstName.Text = string.Empty;
                txtMidName.Text = string.Empty;
                txtLastName.Text = string.Empty;
                txtUserName.Text = string.Empty;
                txtPassword.Text = string.Empty;
            }
            EnableMode();
        }
Esempio n. 2
0
 private Employee GetData()
 {
     Employee entity = new Employee();
     entity.employee_id = Converts.ParseLong(keyCode);
     entity.employee_group_id = 1;
     entity.employee_no = txtEmployeeNo.Text;
     entity.first_name = txtFirstName.Text;
     entity.mid_name = txtMidName.Text;
     entity.last_name = txtLastName.Text;
     entity.user_name = txtUserName.Text;
     entity.user_password = txtPassword.Text;
     entity.created_by = "SYSTEM";
     entity.created_date = DateTime.Now;
     entity.updated_by = "SYSTEM";
     entity.updated_date = DateTime.Now;
     return entity;
 }