Пример #1
0
        public int Delete(TC_OA_LingYongMenonySumModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TC_OA_LingYongMenonySumBLL().Delete(ObjModel.Code, 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)
        {
            TC_OA_LingYongMenonySumModel objModel = this.GetModel(Code, Transaction);

            objModel.Auditing = 3;
            return(this.Update(objModel, Transaction));
        }
Пример #3
0
        public TC_OA_LingYongMenonySumModel GetTC_OA_LingYongMenonySum(int Code)
        {
            TC_OA_LingYongMenonySumModel model = new TC_OA_LingYongMenonySumModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new TC_OA_LingYongMenonySumBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
Пример #4
0
        public int Update(TC_OA_LingYongMenonySumModel ObjModel, SqlTransaction Transaction)
        {
            TC_OA_LingYongMenonySumDAL mdal = new TC_OA_LingYongMenonySumDAL(Transaction);

            return(mdal.Update(ObjModel));
        }