コード例 #1
0
        public int Delete(TY_ReferendumReportModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TY_ReferendumReportBLL().Delete(ObjModel.ReferendumReportCode, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
コード例 #2
0
        public int ModifyPassAuditing(int Code, SqlTransaction Transaction)
        {
            TY_ReferendumReportModel objModel = this.GetModel(Code, Transaction);

            objModel.Audit = "3";
            return(this.Update(objModel, Transaction));
        }
コード例 #3
0
        public TY_ReferendumReportModel GetTY_ReferendumReport(int Code)
        {
            TY_ReferendumReportModel model = new TY_ReferendumReportModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                try
                {
                    model = new TY_ReferendumReportBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
コード例 #4
0
        public int Update(TY_ReferendumReportModel ObjModel, SqlTransaction Transaction)
        {
            TY_ReferendumReportDAL tdal = new TY_ReferendumReportDAL(Transaction);

            return(tdal.Update(ObjModel));
        }