Exemple #1
0
        public List <GK_OA_FileChangeModel> GetGK_OA_FileChangeList(string SortColumns, int StartRecord, int MaxRecords, string FileSystemCodeEqual, string FileNameEqual, string FileCodeEqual, string UnitCodeEqual, DateTime SubmitDateEqualStart, DateTime SubmitDateEqualEnd, string StatusEqual)
        {
            List <GK_OA_FileChangeModel> models        = new List <GK_OA_FileChangeModel>();
            GK_OA_FileChangeQueryModel   objQueryModel = new GK_OA_FileChangeQueryModel();

            objQueryModel.StartRecord          = StartRecord;
            objQueryModel.MaxRecords           = MaxRecords;
            objQueryModel.SortColumns          = SortColumns;
            objQueryModel.FileSystemCodeEqual  = FileSystemCodeEqual;
            objQueryModel.FileNameEqual        = FileNameEqual;
            objQueryModel.FileCodeEqual        = FileCodeEqual;
            objQueryModel.UnitCodeEqual        = UnitCodeEqual;
            objQueryModel.SubmitDateEqualStart = SubmitDateEqualStart;
            objQueryModel.SubmitDateEqualEnd   = SubmitDateEqualEnd;
            objQueryModel.StatusEqual          = StatusEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new GK_OA_FileChangeBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Exemple #2
0
        public int Update(GK_OA_FileChangeModel ObjModel)
        {
            int num = 0;

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new GK_OA_FileChangeBLL().ModifyNotPassAuditing(Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Exemple #4
0
        public GK_OA_FileChangeModel GetGK_OA_FileChange(int Code)
        {
            GK_OA_FileChangeModel model = new GK_OA_FileChangeModel();

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    GK_OA_FileChangeBLL ebll = new GK_OA_FileChangeBLL();
                    list.Add(ebll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
Exemple #6
0
        public List <GK_OA_FileChangeModel> GetGK_OA_FileChangeList(GK_OA_FileChangeQueryModel QueryModel)
        {
            List <GK_OA_FileChangeModel> models = new List <GK_OA_FileChangeModel>();

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