Exemplo n.º 1
0
 public static void SaveWorkCaseEx(DataSet workCaseDs, string caseCode, string ActCode)
 {
     try
     {
         EntityData        entitydata = WorkFlowRule.SaveWorkFlowCaseData(workCaseDs, caseCode);
         StandardEntityDAO ydao       = new StandardEntityDAO("Standard_WorkFlowCase");
         ydao.BeginTrans();
         try
         {
             if (entitydata != null)
             {
                 for (int i = entitydata.Tables["WorkFlowAct"].Rows.Count - 1; i >= 0; i--)
                 {
                     if (ActCode == entitydata.Tables["WorkFlowAct"].Rows[i]["ActCode"].ToString())
                     {
                         entitydata.Tables["WorkFlowAct"].Rows[i].Delete();
                     }
                 }
                 ydao.SubmitEntity(entitydata);
             }
             ydao.CommitTrans();
         }
         catch (Exception exception)
         {
             ydao.RollBackTrans();
             throw exception;
         }
         entitydata.Dispose();
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public static void SaveContractAuditing(DataSet workCaseDs, EntityData applicationEntity, EntityData contractEntity, string caseCode)
 {
     try
     {
         EntityData        entitydata = WorkFlowRule.SaveWorkFlowCaseData(workCaseDs, caseCode);
         StandardEntityDAO ydao       = new StandardEntityDAO("Standard_WorkFlowCase");
         ydao.BeginTrans();
         try
         {
             try
             {
                 if (entitydata != null)
                 {
                     ydao.SubmitEntity(entitydata);
                 }
                 ydao.EntityName = "WorkFlow_Leave";
                 ydao.SubmitEntity(applicationEntity);
                 ydao.EntityName = "Standard_Contract";
                 ydao.SubmitEntity(contractEntity);
                 ydao.CommitTrans();
             }
             catch (Exception exception)
             {
                 ydao.RollBackTrans();
                 throw exception;
             }
         }
         finally
         {
             ydao.Dispose();
         }
         entitydata.Dispose();
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 3
0
 public static void SaveWorkCaseEx(DataSet workCaseDs, string caseCode)
 {
     try
     {
         EntityData        entitydata = WorkFlowRule.SaveWorkFlowCaseData(workCaseDs, caseCode);
         StandardEntityDAO ydao       = new StandardEntityDAO("Standard_WorkFlowCase");
         try
         {
             if (entitydata != null)
             {
                 ydao.SubmitEntity(entitydata);
             }
         }
         catch (Exception exception)
         {
             throw exception;
         }
         entitydata.Dispose();
     }
     catch
     {
         throw;
     }
 }