示例#1
0
        public int Delete(TC_OA_LingYongMenonyModel ObjModel)
        {
            int num = 0;

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

            objModel.Auditing = 3;
            return(this.Update(objModel, Transaction));
        }
示例#3
0
        public TC_OA_LingYongMenonyModel GetTC_OA_LingYongMenony(int Code)
        {
            TC_OA_LingYongMenonyModel model = new TC_OA_LingYongMenonyModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new TC_OA_LingYongMenonyBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
示例#4
0
        public int Update(TC_OA_LingYongMenonyModel ObjModel, SqlTransaction Transaction)
        {
            TC_OA_LingYongMenonyDAL ydal = new TC_OA_LingYongMenonyDAL(Transaction);

            return(ydal.Update(ObjModel));
        }