public employeeRow AddemployeeRow(string firstname, string lastname, string homephone, string notes, string employeeid)
            {
                employeeRow rowemployeeRow = ((employeeRow)(this.NewRow()));

                rowemployeeRow.ItemArray = new object[] {
                    firstname,
                    lastname,
                    homephone,
                    notes,
                    employeeid
                };
                this.Rows.Add(rowemployeeRow);
                return(rowemployeeRow);
            }
 public employeeRowChangeEvent(employeeRow row, System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public void RemoveemployeeRow(employeeRow row) {
     this.Rows.Remove(row);
 }
 public void AddemployeeRow(employeeRow row) {
     this.Rows.Add(row);
 }
 public employeeRowChangeEvent(employeeRow row, System.Data.DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
 public void RemoveemployeeRow(employeeRow row)
 {
     this.Rows.Remove(row);
 }
 public void AddemployeeRow(employeeRow row)
 {
     this.Rows.Add(row);
 }
Example #8
0
            public void CheckValues(employeeRow row)
            {
                //Check employee no
                // if (row.IsNull("employee_no") || row.employee_no.Trim().Length == 0)
                // {
                //     row.SetColumnError("employee_no", "Enter employee no");
                // }
                // else
                // {
                //     row.SetColumnError("employee_no", "");
                // }

                //Logon no
                if (row.IsNull("logon_no") || row.logon_no.Length <= 2)
                {
                    row.SetColumnError("logon_no", "Enter logon no");
                }
                else
                {
                    row.SetColumnError("logon_no", "");
                }

                //Check logon pass
                if (row.IsNull("logon_pass") || row.logon_pass.Length <= 2)
                {
                    row.SetColumnError("logon_pass", "Enter a password with at least 3 digits long");
                }
                else
                {
                    row.SetColumnError("logon_pass", "");
                }

                //Check role id
                if (row.IsNull("role_id") || row.role_id.Trim().Length == 0)
                {
                    row.SetColumnError("role_id", "Select an employee role");
                }
                else
                {
                    row.SetColumnError("role_id", "");
                }

                //Check First Name
                if (row.IsNull("fname") || row.fname.Trim().Length == 0)
                {
                    row.SetColumnError("fname", "Enter first name");
                }
                else
                {
                    row.SetColumnError("fname", "");
                }

                //Check Employee no
                if (row.IsNull("employee_no") || row.employee_no.Length == 0)
                {
                    row.SetColumnError("employee_no", "Enter employee no");
                }
                else
                {
                    row.SetColumnError("employee_no", "");
                }
            }