コード例 #1
0
 public void SaveSolutionOthers(Sender sender, SaveSolutionOthersArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy(true))
         {
             SolutionOthers obj = new SolutionOthers();
             obj.DetailID = args.SolutionOthers.DetailID;
             if (op.LoadSolutionOthersByDetailID(obj) == 0)
             {
                 op.InsertSolutionOthers(args.SolutionOthers);
             }
             else
             {
                 op.UpdateSolutionOthersByDetailID(args.SolutionOthers);
             }
             op.CommitTransaction();
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
コード例 #2
0
 public SolutionOthers GetSolutionOthers(Sender sender, Guid DetailID)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             SolutionOthers obj = new SolutionOthers();
             obj.DetailID = DetailID;
             if (op.LoadSolutionOthersByDetailID(obj) == 0)
             {
                 return(null);
             }
             return(obj);
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }