コード例 #1
0
 private void DeleteCarryForwardRule(ICarryForwardBusinessConfiguration carryFwdConfig)
 {
     // If pending rule execution is successfull, the corresponding carry forward rule will be deleted from the carryforward table.
     using (LADAutomationEntities context = new LADAutomationEntities())
     {
         var record = context.CarryForwardRules.Where(e => e.Id.Equals(carryFwdConfig.Id)).FirstOrDefault();
         context.CarryForwardRules.Remove(record);
         context.SaveChanges();
     }
 }
コード例 #2
0
 private void AddCarryForwardRule(IBusinessConfiguration businessConfiguration)
 {
     // If the rule execution is not successful, add record the carryforward table
     using (LADAutomationEntities context = new LADAutomationEntities())
     {
         var carryForward = new CarryForwardRule();
         carryForward.PendingSince = DateTime.Now;
         carryForward.Rule_Id      = businessConfiguration.RuleId;
         context.CarryForwardRules.Add(carryForward);
         context.SaveChanges();
     }
 }