/// <summary> /// Created By :: Sakthivel.R /// Created On :: 29-6-2015 /// Comments :: Insertion function of Userplantype details. /// </summary> #region Insert_UserplantypeCreation public void UserplantypeInsert(Userplantype objUserplantype) { objEmailCampDataContext = new EmailCampDataContext(); var Insert = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "i") select cde).ToList(); Insert = null; objEmailCampDataContext = null; }
public void UserplantypeInsert(Userplantype objUserplantype) { objEmailCampDataContext = new EmailCampDataContext(); var Insert = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "i") select cde).ToList(); Insert = null; objEmailCampDataContext = null; }
/// <summary> /// Created By :: Sakthivel.R /// Created On :: 29-6-2015 /// Comments :: Updation function of Userplantype details. /// </summary> #region Delete_UserplantypeCreation public void UserplantypeDelete(int Userplantypeid) { try { objEmailCampDataContext = new EmailCampDataContext(); var Delete = (from cde in objEmailCampDataContext.spPlanType_AllActions(Userplantypeid, null, null, null, null, null, null, null, null, null, null, null, "d") select cde).ToList(); Delete = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }
/// <summary> /// Created By :: Sakthivel.R /// Created On :: 29-6-2015 /// Comments :: Updation function of Userplantype details. /// </summary> #region Update_UserplantypeCreation public void UserplantypeUpdate(Userplantype objUserplantype) { try { objEmailCampDataContext = new EmailCampDataContext(); var Update = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "u") select cde).ToList(); Update = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }
public void UserplantypeDelete(int Userplantypeid) { try { objEmailCampDataContext = new EmailCampDataContext(); var Delete = (from cde in objEmailCampDataContext.spPlanType_AllActions(Userplantypeid, null, null, null, null, null, null, null, null, null, null, null, "d") select cde).ToList(); Delete = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }
/// <summary> /// Created By :: Sakthivel.R /// Created On :: 29-6-2015 /// Comments :: Select all records for Userplantype details. /// </summary> #region Select_Records_CreateUserplantype public List <Userplantype> UserplantypeSelect(int PK_UserplantypeID) { objEmailCampDataContext = new EmailCampDataContext(); lstUserplantype = new List <Userplantype>(); var Select = (from cde in objEmailCampDataContext.spPlanType_AllActions(PK_UserplantypeID, null, null, null, null, null, null, null, null, null, null, null, "s") select cde).ToList(); if (Select.Count > 0) { lstUserplantype = new List <Userplantype>(); foreach (var item in Select) { objUserplantype = new Userplantype(); objUserplantype.PK_PlanID = item.PK_PlanID; objUserplantype.PlanName = item.PlanName; objUserplantype.IsSingleUser = item.IsSingleUser; objUserplantype.Planrate = item.Planrate; if (item.NOC != null) { objUserplantype.NOC = Convert.ToInt32(item.NOC); } objUserplantype.AllowedMails = Convert.ToInt32(item.AllowedMails); objUserplantype.IsActive = item.IsActive; objUserplantype.Plandate = item.plandate; objUserplantype.CreatedOn = item.CreatedOn; objUserplantype.CreatedBy = item.CreatedBy; objUserplantype.UpdatedBy = item.UpdatedBy; objUserplantype.UpdatedOn = item.UpdatedOn; lstUserplantype.Add(objUserplantype); } } objEmailCampDataContext = null; objUserplantype = null; return(lstUserplantype); }
public List<Userplantype> UserplantypeSelect(int PK_UserplantypeID) { objEmailCampDataContext = new EmailCampDataContext(); lstUserplantype = new List<Userplantype>(); var Select = (from cde in objEmailCampDataContext.spPlanType_AllActions(PK_UserplantypeID, null, null, null, null, null, null, null, null, null, null, null, "s") select cde).ToList(); if (Select.Count > 0) { lstUserplantype = new List<Userplantype>(); foreach (var item in Select) { objUserplantype = new Userplantype(); objUserplantype.PK_PlanID = item.PK_PlanID; objUserplantype.PlanName = item.PlanName; objUserplantype.IsSingleUser = item.IsSingleUser; objUserplantype.Planrate = item.Planrate; if(item.NOC != null) objUserplantype.NOC = Convert.ToInt32(item.NOC); objUserplantype.AllowedMails = Convert.ToInt32(item.AllowedMails); objUserplantype.IsActive = item.IsActive; objUserplantype.Plandate = item.plandate; objUserplantype.CreatedOn = item.CreatedOn; objUserplantype.CreatedBy = item.CreatedBy; objUserplantype.UpdatedBy = item.UpdatedBy; objUserplantype.UpdatedOn = item.UpdatedOn; lstUserplantype.Add(objUserplantype); } } objEmailCampDataContext = null; objUserplantype = null; return lstUserplantype; }
public void UserplantypeUpdate(Userplantype objUserplantype) { try { objEmailCampDataContext = new EmailCampDataContext(); var Update = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "u") select cde).ToList(); Update = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }