public void insertProcessModel(ProcessProcessModel processmodel)
 {
     using (ProcessManagerDbEntities db = new ProcessManagerDbEntities())
     {
         Process process = processModelToProcess(processmodel);
         db.Process.Add(process);
         db.SaveChanges();
     }
 }
 public int updateProcess(ProcessProcessModel processmodel)
 {
     using (ProcessManagerDbEntities db = new ProcessManagerDbEntities())
     {
         Process process = selectProcessbyIdorder(processmodel.Pid, processmodel.Order, db);
         processModelToProcess(processmodel, process);
         int i = db.SaveChanges();
         return(i);
     }
 }
 /// <summary>
 /// 插入单个流程数据
 /// </summary>
 /// <param name="processmodel">需插入的数据</param>
 public int insert(ProcessProcessModel processmodel)
 {
     using (ProcessManagerDbEntities db = new ProcessManagerDbEntities())
     {
         Process process = processModelToProcess(processmodel);
         db.Process.Add(process);
         int i = db.SaveChanges();
         return(i);
     }
 }
 public void insertProcessModelList(List <ProcessProcessModel> processmodellist)
 {
     using (ProcessManagerDbEntities db = new ProcessManagerDbEntities())
     {
         processmodellist.ForEach(processmodel =>
         {
             Process process = processModelToProcess(processmodel);
             db.Process.Add(process);
         });
         db.SaveChanges();
     }
 }
 public int updateProcesslist(List <ProcessProcessModel> processlist)
 {
     using (ProcessManagerDbEntities db = new ProcessManagerDbEntities())
     {
         processlist.ForEach(processmodel =>
         {
             Process process = selectProcessbyIdorder(processmodel.Pid, processmodel.Order, db);
             processModelToProcess(processmodel, process);
         });
         int i = db.SaveChanges();
         return(i);
     }
 }