예제 #1
0
 public void RSave(BaseEntity p_BE, int p_ID, IDBTransAccess sqlTrans)
 {
     try
     {
         VendorFile entity = (VendorFile)p_BE;
         string     sql    = "DELETE Data_VendorFile WHERE MainID=" + SysString.ToDBString(p_ID);
         sql += " AND Seq=" + SysString.ToDBString(entity.FileTypeID);
         sqlTrans.ExecuteNonQuery(sql);
         VendorFileRule rule = new VendorFileRule();
         entity.MainID = p_ID;
         entity.Seq    = entity.FileTypeID;
         rule.RAdd(entity, sqlTrans);
     }
     catch (BaseException)
     {
         throw;
     }
     catch (Exception E)
     {
         throw new BaseException(E.Message);
     }
 }
예제 #2
0
 public void RSave(BaseEntity[] p_BE, int p_ID, IDBTransAccess sqlTrans)
 {
     try
     {
         string sql = "DELETE Data_VendorFile WHERE MainID=" + SysString.ToDBString(p_ID);
         sqlTrans.ExecuteNonQuery(sql);
         for (int i = 0; i < p_BE.Length; i++)
         {
             VendorFileRule rule   = new VendorFileRule();
             VendorFile     entity = (VendorFile)p_BE[i];
             entity.MainID = p_ID;
             entity.Seq    = i + 1;
             rule.RAdd(entity, sqlTrans);
         }
     }
     catch (BaseException)
     {
         throw;
     }
     catch (Exception E)
     {
         throw new BaseException(E.Message);
     }
 }