Beispiel #1
0
        public int ModifyNotAuditing(int Code)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TC_OA_WorkConcertBLL().ModifyNotAuditing(Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Beispiel #2
0
        public TC_OA_WorkConcertModel GetTC_OA_WorkConcert(int Code)
        {
            TC_OA_WorkConcertModel model = new TC_OA_WorkConcertModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new TC_OA_WorkConcertBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
Beispiel #3
0
        public List <TC_OA_WorkConcertModel> GetTC_OA_WorkConcertListOne(int Code)
        {
            List <TC_OA_WorkConcertModel> list = new List <TC_OA_WorkConcertModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    TC_OA_WorkConcertBLL tbll = new TC_OA_WorkConcertBLL();
                    list.Add(tbll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
Beispiel #4
0
        public List <TC_OA_WorkConcertModel> GetTC_OA_WorkConcertList(TC_OA_WorkConcertQueryModel QueryModel)
        {
            List <TC_OA_WorkConcertModel> models = new List <TC_OA_WorkConcertModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    if (QueryModel == null)
                    {
                        QueryModel = new TC_OA_WorkConcertQueryModel();
                    }
                    models = new TC_OA_WorkConcertBLL().GetModels(QueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }