public string DeletePlanTypeMaster(int plantypemasterID) { PlanTypeMaster plan = new PlanTypeMaster(); plan.PlanTypeMasterID = plantypemasterID; PlanTypeMasterService ptmService = new PlanTypeMasterService(); int i = ptmService.DeletePlanTypeMaster(plan); return(i.ToString()); }
public int AddPlanTypeMaster(PlanTypeMaster model) { using (REMSDBEntities context = new REMSDBEntities()) { try { context.PlanTypeMasters.Add(model); int i = context.SaveChanges(); return(i); } catch (Exception ex) { Helper hp = new Helper(); hp.LogException(ex); return(0); } } }
public int EditPlanTypeMaster(PlanTypeMaster model) { using (REMSDBEntities context = new REMSDBEntities()) { try { context.PlanTypeMasters.Add(model); context.Entry(model).State = EntityState.Modified; int i = context.SaveChanges(); return(i); } catch (Exception ex) { Helper hp = new Helper(); hp.LogException(ex); return(0); } } }