Example #1
0
        /// <summary>
        /// 新增(传入事务处理)
        /// </summary>
        /// <param name="p_BE">要新增的实体</param>
        /// <param name="sqlTrans">事务类</param>
        public void RAdd(ReportManage p_BE, BaseEntity[] p_BE2, ReportFile p_BE3, IDBTransAccess sqlTrans)
        {
            try
            {
                this.RAdd(p_BE, sqlTrans);
                ReportManageDtsRule ruledts = new ReportManageDtsRule();
                ruledts.RSave(p_BE, p_BE2, sqlTrans);//保存从表

                ReportFileRule ruleFile = new ReportFileRule();
                p_BE3.FileID = p_BE.ID;
                ruleFile.RAdd(p_BE3, sqlTrans);

                string sql = " UPDATE Data_ReportManage SET  FileID = " + p_BE3.ID;
                sql += " WHERE ID =" + p_BE.ID;
                sqlTrans.ExecuteNonQuery(sql);
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }
Example #2
0
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="p_BE">要修改的实体</param>
        /// <param name="sqlTrans">事务类</param>
        public void RUpdate(BaseEntity p_BE, BaseEntity[] p_BE2, BaseEntity p_BE3, IDBTransAccess sqlTrans)
        {
            try
            {
                this.RUpdate(p_BE, sqlTrans);
                ReportManageDtsRule ruledts = new ReportManageDtsRule();
                ruledts.RSave((ReportManage)p_BE, p_BE2, sqlTrans);//保存从表

                ReportFileRule ruleFile = new ReportFileRule();
                ruleFile.RUpdate(p_BE3, sqlTrans);
            }
            catch (BaseException)
            {
                throw;
            }
            catch (Exception E)
            {
                throw new BaseException(E.Message);
            }
        }