Beispiel #1
0
            public departmentRow AdddepartmentRow(int iddepartment, string description, string server, string db, string userdep, System.DateTime ct, string cu, System.DateTime lt, string lu)
            {
                departmentRow rowdepartmentRow = ((departmentRow)(this.NewRow()));

                object[] columnValuesArray = new object[] {
                    iddepartment,
                    description,
                    server,
                    db,
                    userdep,
                    ct,
                    cu,
                    lt,
                    lu
                };
                rowdepartmentRow.ItemArray = columnValuesArray;
                this.Rows.Add(rowdepartmentRow);
                return(rowdepartmentRow);
            }
            private void CheckValues(departmentRow row)
            {
                // Check department_id
                if (row.IsNull("department_id") || row.department_id.Trim().Length == 0)
                {
                    row.SetColumnError("department_id", "Please enter department id");
                }
                else
                {
                    row.SetColumnError("department_id", "");
                }


                //Check department Name
                if (row.IsNull("department_name") || row.department_name.Trim().Length == 0)
                {
                    row.SetColumnError("department_name", "Please enter department name");
                }
                else
                {
                    row.SetColumnError("department_name", "");
                }
            }
 public void RemovedepartmentRow(departmentRow row) {
     this.Rows.Remove(row);
 }
 public void AdddepartmentRow(departmentRow row) {
     this.Rows.Add(row);
 }
 public departmentRowChangeEvent(departmentRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public workersRow AddworkersRow(string FIO, departmentRow parentdepartmentRowByFK_workers_department, positionRow parentpositionRowByFK_workers_position) {
     workersRow rowworkersRow = ((workersRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             FIO,
             null,
             null};
     if ((parentdepartmentRowByFK_workers_department != null)) {
         columnValuesArray[2] = parentdepartmentRowByFK_workers_department[0];
     }
     if ((parentpositionRowByFK_workers_position != null)) {
         columnValuesArray[3] = parentpositionRowByFK_workers_position[0];
     }
     rowworkersRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowworkersRow);
     return rowworkersRow;
 }
Beispiel #7
0
 public departmentRowChangeEvent(departmentRow row, global::System.Data.DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Beispiel #8
0
 public void RemovedepartmentRow(departmentRow row)
 {
     this.Rows.Remove(row);
 }
Beispiel #9
0
 public void AdddepartmentRow(departmentRow row)
 {
     this.Rows.Add(row);
 }