public int InsertNewPlan(Model.Plans plan) { plan.PlanDate = DateTime.Now; int id = -1; if (DalBase.Insert(plan) > 0) { id = DalBase.GetMax <Model.Plans>(); } return(id); }
public int UpdPlan(Model.Plans plan) { plan.PlanResultDate = DateTime.Now; return(DalBase.Updata(plan)); }