public static BOEmployeeList GetEmployeeDetails() { BOEmployeeList itemObjs = null; var ds = spGetEmployeeDetails.ExecuteDataset(); if (ds != null && ds.Tables[0].Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach (DataRow dr in ds.Tables[0].Rows) { itemObjs.Add(FillData(FillDataRecord(dr), dr)); } } return itemObjs; }
public static BOEmployeeList GetEmployeeDetails() { BOEmployeeList itemObjs = null; var ds = spGetEmployeeDetails.ExecuteDataset(); if (ds != null && ds.Tables[0].Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach (DataRow dr in ds.Tables[0].Rows) { itemObjs.Add(FillData(FillDataRecord(dr), dr)); } } return(itemObjs); }
public static BOEmployeeList GetAllList(int startIndex, int length, string whereClause) { BOEmployeeList itemObjs = null; tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null); if (dt.Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach(DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return itemObjs; }
public static BOEmployeeList GetAllList() { BOEmployeeList itemObjs = null; tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.GetAllData(); if (dt.Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach(DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return itemObjs; }
public static BOEmployeeList GetAllList(int startIndex, int length, string whereClause) { BOEmployeeList itemObjs = null; tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null); if (dt.Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach (DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return(itemObjs); }
public static BOEmployeeList GetAllList() { BOEmployeeList itemObjs = null; tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.GetAllData(); if (dt.Rows.Count > 0) { itemObjs = new BOEmployeeList(); foreach (DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return(itemObjs); }
public static int Save(BOEmployeeList entryList, bool adding) { tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.Table(); int i = 0; foreach (BOEmployee entry in entryList) { DataRow newRow = tblObj.Table().NewRow(); newRow[tblEmployee.FIRSTNAME_FIELD] = entry.FirstName; newRow[tblEmployee.LASTNAME_FIELD] = entry.LastName; newRow[tblEmployee.EMAILADDRESS_FIELD] = entry.EmailAddress; newRow[tblEmployee.PASSWORD_FIELD] = entry.Password; newRow[tblEmployee.EMPLOYEETYPE_FIELD] = entry.EmployeeType; if (entry.CreatedOn.Equals(new DateTime())) { newRow[tblEmployee.CREATEDON_FIELD] = DBNull.Value; } else { newRow[tblEmployee.CREATEDON_FIELD] = entry.CreatedOn; } newRow[tblEmployee.CREATEDBYID_FIELD] = entry.CreatedByID; if (entry.ModifiedOn.Equals(new DateTime())) { newRow[tblEmployee.MODIFIEDON_FIELD] = DBNull.Value; } else { newRow[tblEmployee.MODIFIEDON_FIELD] = entry.ModifiedOn; } newRow[tblEmployee.MODIFIEDBYID_FIELD] = entry.ModifiedByID; newRow[tblEmployee.ISACTIVE_FIELD] = entry.IsActive; dt.Rows.Add(newRow); i++; } //if(adding): Commented out at the moment. KS 28th Aug 2012 return(tblObj.AddToTable(dt)); //else //return tblObj.UpdateTable(dt); }
public static int Save(BOEmployeeList list, bool adding) { return tblEmployeeDBManager.Save(list,adding); }
public static int Save(BOEmployeeList entryList, bool adding) { tblEmployee tblObj = new tblEmployee(); DataTable dt = tblObj.Table(); int i = 0; foreach(BOEmployee entry in entryList) { DataRow newRow = tblObj.Table().NewRow(); newRow[tblEmployee.FIRSTNAME_FIELD] = entry.FirstName; newRow[tblEmployee.LASTNAME_FIELD] = entry.LastName; newRow[tblEmployee.EMAILADDRESS_FIELD] = entry.EmailAddress; newRow[tblEmployee.PASSWORD_FIELD] = entry.Password; newRow[tblEmployee.EMPLOYEETYPE_FIELD] = entry.EmployeeType; if(entry.CreatedOn.Equals(new DateTime())) newRow[tblEmployee.CREATEDON_FIELD] = DBNull.Value; else newRow[tblEmployee.CREATEDON_FIELD] = entry.CreatedOn; newRow[tblEmployee.CREATEDBYID_FIELD] = entry.CreatedByID; if(entry.ModifiedOn.Equals(new DateTime())) newRow[tblEmployee.MODIFIEDON_FIELD] = DBNull.Value; else newRow[tblEmployee.MODIFIEDON_FIELD] = entry.ModifiedOn; newRow[tblEmployee.MODIFIEDBYID_FIELD] = entry.ModifiedByID; newRow[tblEmployee.ISACTIVE_FIELD] = entry.IsActive; dt.Rows.Add(newRow); i++; } //if(adding): Commented out at the moment. KS 28th Aug 2012 return tblObj.AddToTable(dt); //else //return tblObj.UpdateTable(dt); }
public static int Save(BOEmployeeList list, bool adding) { return(tblEmployeeDBManager.Save(list, adding)); }