コード例 #1
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="p_BE">要修改的实体</param>
        /// <param name="sqlTrans">事务类</param>
        public void RUpdate(BaseEntity p_BE, BaseEntity[] p_BE1, IDBTransAccess sqlTrans)
        {
            try
            {
                this.RUpdate(p_BE, sqlTrans);
                string sql = " DELETE FROM ADH_CheckFormDts where MainID=" + ((CheckForm)p_BE).ID;

                sqlTrans.ExecuteNonQuery(sql);
                CheckFormDtsRule rule = new CheckFormDtsRule();
                for (int i = 0; i < p_BE1.Length; i++)
                {
                    CheckFormDts entitydts = p_BE1[i] as CheckFormDts;
                    entitydts.MainID = ((CheckForm)p_BE).ID;
                    entitydts.Seq    = i + 1;
                    rule.RAdd(entitydts, sqlTrans);
                }
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }
コード例 #2
0
 /// <summary>
 /// 新增(传入事务处理)
 /// </summary>
 /// <param name="p_BE">要新增的实体</param>
 /// <param name="sqlTrans">事务类</param>
 public void RAdd(BaseEntity p_BE, BaseEntity[] p_BE1, IDBTransAccess sqlTrans)
 {
     try
     {
         this.RAdd(p_BE, sqlTrans);
         CheckFormDtsRule rule = new CheckFormDtsRule();
         for (int i = 0; i < p_BE1.Length; i++)
         {
             CheckFormDts entitydts = p_BE1[i] as CheckFormDts;
             entitydts.MainID = ((CheckForm)p_BE).ID;
             entitydts.Seq    = i + 1;
             rule.RAdd(entitydts, sqlTrans);
         }
     }
     catch (BaseException)
     {
         throw;
     }
     catch (Exception E)
     {
         throw new BaseException(E.Message);
     }
 }