public static BOMailSummaryList GetAllList(int startIndex, int length, string whereClause) { BOMailSummaryList itemObjs = null; tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null); if (dt.Rows.Count > 0) { itemObjs = new BOMailSummaryList(); foreach(DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return itemObjs; }
public static BOMailSummaryList GetAllList() { BOMailSummaryList itemObjs = null; tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.GetAllData(); if (dt.Rows.Count > 0) { itemObjs = new BOMailSummaryList(); foreach(DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return itemObjs; }
public static BOMailSummaryList GetAllList(int startIndex, int length, string whereClause) { BOMailSummaryList itemObjs = null; tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null); if (dt.Rows.Count > 0) { itemObjs = new BOMailSummaryList(); foreach (DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return(itemObjs); }
public static BOMailSummaryList GetAllList() { BOMailSummaryList itemObjs = null; tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.GetAllData(); if (dt.Rows.Count > 0) { itemObjs = new BOMailSummaryList(); foreach (DataRow dr in dt.Rows) { itemObjs.Add(FillDataRecord(dr)); } } return(itemObjs); }
public static int Save(BOMailSummaryList entryList, bool adding) { tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.Table(); int i = 0; foreach (BOMailSummary entry in entryList) { DataRow newRow = tblObj.Table().NewRow(); newRow[tblMailSummary.TOEMPLOYEEID_FIELD] = entry.ToEmployeeID; newRow[tblMailSummary.CCEMPLOYEEID_FIELD] = entry.CCEmployeeID; newRow[tblMailSummary.FROMEMPLOYEEID_FIELD] = entry.FromEmployeeID; newRow[tblMailSummary.MESSAGEBODY_FIELD] = entry.MessageBody; newRow[tblMailSummary.MAILSUBJECT_FIELD] = entry.MailSubject; if (entry.CreatedOn.Equals(new DateTime())) { newRow[tblMailSummary.CREATEDON_FIELD] = DBNull.Value; } else { newRow[tblMailSummary.CREATEDON_FIELD] = entry.CreatedOn; } newRow[tblMailSummary.CREATEDBYID_FIELD] = entry.CreatedByID; if (entry.ModifiedOn.Equals(new DateTime())) { newRow[tblMailSummary.MODIFIEDON_FIELD] = DBNull.Value; } else { newRow[tblMailSummary.MODIFIEDON_FIELD] = entry.ModifiedOn; } newRow[tblMailSummary.MODIFIEDBYID_FIELD] = entry.ModifiedByID; 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(BOMailSummaryList entryList, bool adding) { tblMailSummary tblObj = new tblMailSummary(); DataTable dt = tblObj.Table(); int i = 0; foreach(BOMailSummary entry in entryList) { DataRow newRow = tblObj.Table().NewRow(); newRow[tblMailSummary.TOEMPLOYEEID_FIELD] = entry.ToEmployeeID; newRow[tblMailSummary.CCEMPLOYEEID_FIELD] = entry.CCEmployeeID; newRow[tblMailSummary.FROMEMPLOYEEID_FIELD] = entry.FromEmployeeID; newRow[tblMailSummary.MESSAGEBODY_FIELD] = entry.MessageBody; newRow[tblMailSummary.MAILSUBJECT_FIELD] = entry.MailSubject; if(entry.CreatedOn.Equals(new DateTime())) newRow[tblMailSummary.CREATEDON_FIELD] = DBNull.Value; else newRow[tblMailSummary.CREATEDON_FIELD] = entry.CreatedOn; newRow[tblMailSummary.CREATEDBYID_FIELD] = entry.CreatedByID; if(entry.ModifiedOn.Equals(new DateTime())) newRow[tblMailSummary.MODIFIEDON_FIELD] = DBNull.Value; else newRow[tblMailSummary.MODIFIEDON_FIELD] = entry.ModifiedOn; newRow[tblMailSummary.MODIFIEDBYID_FIELD] = entry.ModifiedByID; 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(BOMailSummaryList list, bool adding) { return(tblMailSummaryDBManager.Save(list, adding)); }
public static int Save(BOMailSummaryList list, bool adding) { return tblMailSummaryDBManager.Save(list,adding); }