示例#1
0
        public Form3(object[] values, int UserId)
        {
            InitializeComponent();

            GetEmployees = StaffDAL.getEmployeeDetails(int.Parse(values[0].ToString()));
            employee     = GetEmployees.Rows[0].ItemArray;

            txtFirstName.Text          = employee[2].ToString();
            txtLastName.Text           = employee[1].ToString();
            txtNickname.Text           = employee[3].ToString();
            txtTelephoneExtension.Text = employee[6].ToString();
            txtUsername.Text           = employee[4].ToString();
            txtFlagDeleted.Text        = employee[7].ToString();
        }
示例#2
0
        public static Staff GetDetail(int id)
        {
            Staff staff = new Staff();

            DatabaseDataSet.getEmployeeDetailsDataTable getEmployeeDetails = StaffDAL.getEmployeeDetails(id);
            if (getEmployeeDetails[0].ManagerID == null)
            {
                staff = new Staff(getEmployeeDetails[0].StaffID, getEmployeeDetails[0].Lastname, getEmployeeDetails[0].Firstname, getEmployeeDetails[0].Nickname, getEmployeeDetails[0].Username, getEmployeeDetails[0].InOutStatusID, getEmployeeDetails[0].TelephoneExtension, getEmployeeDetails[0].FlagDeleted);
            }
            else
            {
                staff = new Staff(getEmployeeDetails[0].StaffID, getEmployeeDetails[0].Lastname, getEmployeeDetails[0].Firstname, getEmployeeDetails[0].Nickname, getEmployeeDetails[0].Username, getEmployeeDetails[0].InOutStatusID, getEmployeeDetails[0].TelephoneExtension, getEmployeeDetails[0].FlagDeleted, getEmployeeDetails[0].ManagerID);
            }

            return(staff);
        }
示例#3
0
        public Form2(object[] values, int UserId)
        {
            InitializeComponent();
            GetEmployees = StaffDAL.getEmployeeDetails(int.Parse(values[0].ToString()));
            employee     = GetEmployees.Rows[0].ItemArray;

            txtFirstName.Text          = employee[1].ToString();
            txtLastName.Text           = employee[2].ToString();
            txtNickname.Text           = employee[3].ToString();
            txtTelephoneExtension.Text = employee[6].ToString();
            txtUsername.Text           = employee[4].ToString();
            txtFlagDeleted.Text        = employee[7].ToString();

            bindingSource               = new BindingSource(StaffInOutHistoryDAL.GetEmployeeHistories(int.Parse(employee[0].ToString())), null);
            dataGridView1.DataSource    = bindingSource;
            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }