Esempio n. 1
0
        /// <summary>
        /// 删除资金申请记录
        /// </summary>
        /// <param name="billcode"></param>
        public void DeleteZjsq(string billcode)
        {
            //删除bill_main表
            MainDal mdal = new MainDal();

            mdal.DeleteMain(billcode);
        }
Esempio n. 2
0
        public void DeleteTravelReportBill(string billCode)
        {
            //删除bill_main表
            MainDal mdal = new MainDal();

            mdal.DeleteMain(billCode);
            new Bill_TravelReportBLL().Delete(billCode);
        }
Esempio n. 3
0
        /// <summary>
        /// 删除出差申请单
        /// </summary>
        public void DeleteTravelApplicationBill(string strBillCode)
        {
            //删除bill_main表
            MainDal mdal = new MainDal();

            mdal.DeleteMain(strBillCode);
            new bill_travelApplicationBLL().Delete(strBillCode);
        }
Esempio n. 4
0
        public int Add(Models.Bill_Main modelMainBill)
        {
            int iRel     = dalMain.DeleteMain(modelMainBill.BillCode);
            int iMainRel = dalMain.InsertMain(modelMainBill);

            if (iMainRel < 1)
            {
                throw new Exception("未知错误!");
            }
            else
            {
                return(1);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="MainCode"></param>
        /// <param name="tran"></param>
        /// <returns></returns>
        public int Delete(string MainCode)
        {
            MainDal mdal = new MainDal();

            mdal.DeleteMain(MainCode);
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from bill_zfzxsqd_dz ");
            strSql.Append(" where billcode=@MainCode ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MainCode", SqlDbType.VarChar, 50)
            };
            parameters[0].Value = MainCode;

            return(DataHelper.ExcuteNonQuery(strSql.ToString(), parameters, false));
        }
Esempio n. 6
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public int Delete(string MainCode)
 {
     using (SqlConnection conn = new SqlConnection(DataHelper.constr))
     {
         conn.Open();
         SqlTransaction tran = conn.BeginTransaction();
         try
         {
             MainDal maindal = new MainDal();
             maindal.DeleteMain(MainCode, tran);
             int intRows = Delete(MainCode, tran);
             tran.Commit();
             return(intRows);
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public int Delete(string sqbh)
 {
     using (SqlConnection conn = new SqlConnection(DataHelper.constr))
     {
         conn.Open();
         SqlTransaction tran = conn.BeginTransaction();
         try
         {
             int     iRel = Delete(sqbh, tran);
             MainDal mdal = new MainDal();
             mdal.DeleteMain(sqbh, tran);
             tran.Commit();
             return(iRel);
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public int Delete(string Listid)
 {
     using (SqlConnection conn = new SqlConnection(DataHelper.constr))
     {
         conn.Open();
         SqlTransaction tran = conn.BeginTransaction();
         try
         {
             int row = Delete(Listid, tran);
             DeleteItem(Listid, tran);
             MainDal mdal = new MainDal();
             mdal.DeleteMain(Listid, tran);
             tran.Commit();
             return(row);
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }
Esempio n. 9
0
 public bool Edit(Bill_Main main, ZiChan_ChuZhiDan sqmodel)
 {
     using (SqlConnection conn = new SqlConnection(DataHelper.constr))
     {
         conn.Open();
         SqlTransaction tran = conn.BeginTransaction();
         try
         {
             MainDal maindal = new MainDal();
             maindal.DeleteMain(main.BillCode, tran);
             Delete(main.BillCode, tran);
             maindal.InsertMain(main, tran);
             Add(sqmodel, tran);
             tran.Commit();
             return(true);
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="mainModel"></param>
 /// <param name="model"></param>
 /// <returns></returns>
 public int Add(Bill_Main mainModel, dz_yksqd model)
 {
     using (SqlConnection conn = new SqlConnection(DataHelper.constr))
     {
         conn.Open();
         SqlTransaction tran = conn.BeginTransaction();
         try
         {
             Delete(model.sqbh, tran);
             MainDal maindal = new MainDal();
             maindal.DeleteMain(mainModel.BillCode);
             maindal.InsertMain(mainModel);
             int iRel = Add(model, tran);
             tran.Commit();
             return(iRel);
         }
         catch
         {
             tran.Rollback();
             throw;
         }
     }
 }