コード例 #1
0
        public List <GK_OA_EvectionApplyModel> GetGK_OA_EvectionApplyList(string SortColumns, int StartRecord, int MaxRecords, string DeptEqual, string LiveLevelEqual, string ApplyerEqual, DateTime ApplyStartDate, DateTime ApplyEndDate, string StatusEqual)
        {
            List <GK_OA_EvectionApplyModel> models        = new List <GK_OA_EvectionApplyModel>();
            GK_OA_EvectionApplyQueryModel   objQueryModel = new GK_OA_EvectionApplyQueryModel();

            objQueryModel.StartRecord         = StartRecord;
            objQueryModel.MaxRecords          = MaxRecords;
            objQueryModel.SortColumns         = SortColumns;
            objQueryModel.DeptEqual           = DeptEqual;
            objQueryModel.LiveLevelEqual      = LiveLevelEqual;
            objQueryModel.ApplyerEqual        = ApplyerEqual;
            objQueryModel.ApplyStartDateEqual = ApplyStartDate;
            objQueryModel.ApplyEndDateEqual   = ApplyEndDate;
            objQueryModel.StatusEqual         = StatusEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new GK_OA_EvectionApplyBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
コード例 #2
0
        public int Update(GK_OA_EvectionApplyModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new GK_OA_EvectionApplyBLL().Update(ObjModel, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
コード例 #3
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 GK_OA_EvectionApplyBLL().ModifyPassAuditing(Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
コード例 #4
0
        public GK_OA_EvectionApplyModel GetGK_OA_EvectionApply(int Code)
        {
            GK_OA_EvectionApplyModel model = new GK_OA_EvectionApplyModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new GK_OA_EvectionApplyBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
コード例 #5
0
        public List <GK_OA_EvectionApplyModel> GetGK_OA_EvectionApplyListOne(int Code)
        {
            List <GK_OA_EvectionApplyModel> list = new List <GK_OA_EvectionApplyModel>();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    GK_OA_EvectionApplyBLL ybll = new GK_OA_EvectionApplyBLL();
                    list.Add(ybll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
コード例 #6
0
        public List <GK_OA_EvectionApplyModel> GetGK_OA_EvectionApplyList(GK_OA_EvectionApplyQueryModel QueryModel)
        {
            List <GK_OA_EvectionApplyModel> models = new List <GK_OA_EvectionApplyModel>();

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