Beispiel #1
0
        public int Update(RS_ScoreManageModel ObjModel)
        {
            int num = 0;

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new RS_ScoreManageBLL().ModifyPassAuditing(Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Beispiel #3
0
        public List <RS_ScoreManageModel> GetRS_ScoreManageList(string SortColumns, int StartRecord, int MaxRecords, int CodeEqual, string DeptCodeEqual, string MarkerEqual, DateTime MarkDateEqual, int TypeEqual, string StatusEqual)
        {
            List <RS_ScoreManageModel> models        = new List <RS_ScoreManageModel>();
            RS_ScoreManageQueryModel   objQueryModel = new RS_ScoreManageQueryModel();

            objQueryModel.StartRecord   = StartRecord;
            objQueryModel.MaxRecords    = MaxRecords;
            objQueryModel.SortColumns   = SortColumns;
            objQueryModel.CodeEqual     = CodeEqual;
            objQueryModel.DeptCodeEqual = DeptCodeEqual;
            objQueryModel.MarkerEqual   = MarkerEqual;
            objQueryModel.MarkDateEqual = MarkDateEqual;
            objQueryModel.TypeEqual     = TypeEqual;
            objQueryModel.StatusEqual   = StatusEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new RS_ScoreManageBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Beispiel #4
0
        public RS_ScoreManageModel GetRS_ScoreManage(int Code)
        {
            RS_ScoreManageModel model = new RS_ScoreManageModel();

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    RS_ScoreManageBLL ebll = new RS_ScoreManageBLL();
                    list.Add(ebll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
Beispiel #6
0
        public List <RS_ScoreManageModel> GetRS_ScoreManageList(RS_ScoreManageQueryModel QueryModel)
        {
            List <RS_ScoreManageModel> models = new List <RS_ScoreManageModel>();

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