Пример #1
0
 public decimal UpdateFlow(decimal flowID, decimal accessGroupId, string flowName, IList <UnderManagment> underMnagList)
 {
     try
     {
         BFlow bflow = new BFlow();
         Flow  flow  = bflow.GetByID(flowID);
         flow.ID          = flowID;
         flow.FlowName    = flowName;
         flow.AccessGroup = new PrecardAccessGroup()
         {
             ID = accessGroupId
         };
         flow.UnderManagmentList = new List <UnderManagment>();
         foreach (UnderManagment un in underMnagList)
         {
             un.Flow = flow;
             flow.UnderManagmentList.Add(un);
         }
         UnderManagmentRepository underRep = new UnderManagmentRepository(false);
         underRep.DeleteUnderManagments(flow.ID);
         bflow.SaveChanges(flow, UIActionType.EDIT);
         return(flow.ID);
     }
     catch (Exception ex)
     {
         LogException(ex, "BManager", "UpdateFlow");
         throw ex;
     }
 }