コード例 #1
0
        public List <GK_OA_ManpowerNeedModel> GetGK_OA_ManpowerNeedList(string SortColumns, int StartRecord, int MaxRecords, string SystemCodeEqual, string FileCodeEqual, string UnitCodeEqual, DateTime RegistDateStartEqual, DateTime RegistDateEndEqual, string StatusEqual)
        {
            List <GK_OA_ManpowerNeedModel> models        = new List <GK_OA_ManpowerNeedModel>();
            GK_OA_ManpowerNeedQueryModel   objQueryModel = new GK_OA_ManpowerNeedQueryModel();

            objQueryModel.StartRecord          = StartRecord;
            objQueryModel.MaxRecords           = MaxRecords;
            objQueryModel.SortColumns          = SortColumns;
            objQueryModel.SystemCodeEqual      = SystemCodeEqual;
            objQueryModel.FileCodeEqual        = FileCodeEqual;
            objQueryModel.UnitCodeEqual        = UnitCodeEqual;
            objQueryModel.RegistDateEqualStart = RegistDateStartEqual;
            objQueryModel.RegistDateEqualEnd   = RegistDateEndEqual;
            objQueryModel.StatusEqual          = StatusEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new GK_OA_ManpowerNeedBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
コード例 #2
0
        public int Update(GK_OA_ManpowerNeedModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new GK_OA_ManpowerNeedBLL().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 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_ManpowerNeedBLL().ModifyNotPassAuditing(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_ManpowerNeedModel GetGK_OA_ManpowerNeed(int Code)
        {
            GK_OA_ManpowerNeedModel model = new GK_OA_ManpowerNeedModel();

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    GK_OA_ManpowerNeedBLL dbll = new GK_OA_ManpowerNeedBLL();
                    list.Add(dbll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
コード例 #6
0
        public List <GK_OA_ManpowerNeedModel> GetGK_OA_ManpowerNeedList(GK_OA_ManpowerNeedQueryModel QueryModel)
        {
            List <GK_OA_ManpowerNeedModel> models = new List <GK_OA_ManpowerNeedModel>();

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