Exemple #1
0
        public int UpdateTY_OA_MgrTaskDtlList(List <TY_OA_MgrTaskDtlModel> ObjModelDtls, int MgrCodeID)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TY_OA_MgrTaskDtlBLL().UpdateTY_OA_MgrTaskDtlList(transaction, ObjModelDtls, MgrCodeID);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Exemple #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 TY_OA_MgrTaskDtlBLL().ModifyPassAuditing(Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Exemple #3
0
        public int Delete(TY_OA_MgrTaskDtlModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TY_OA_MgrTaskDtlBLL().Delete(ObjModel.MgrDtlCode, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Exemple #4
0
        public List <TY_OA_MgrTaskDtlModel> GetTY_OA_MgrTaskDtlList(string SortColumns, int StartRecord, int MaxRecords, int MgrDtlCodeEqual, string MgrDtlInfoEqual, DateTime DeadLineEqual, string ResponsePersonEqual, int MgrCodeIDEqual, string AssistpersonsEqual, string TrancRevertEqual, string ManagerRevertEqual, string IsfinishEqual, string StateEqual, string BakEqual)
        {
            List <TY_OA_MgrTaskDtlModel> models        = new List <TY_OA_MgrTaskDtlModel>();
            TY_OA_MgrTaskDtlQueryModel   objQueryModel = new TY_OA_MgrTaskDtlQueryModel();

            objQueryModel.StartRecord         = StartRecord;
            objQueryModel.MaxRecords          = MaxRecords;
            objQueryModel.SortColumns         = SortColumns;
            objQueryModel.MgrDtlCodeEqual     = MgrDtlCodeEqual;
            objQueryModel.MgrDtlInfoEqual     = MgrDtlInfoEqual;
            objQueryModel.DeadLineEqual       = DeadLineEqual;
            objQueryModel.ResponsePersonEqual = ResponsePersonEqual;
            objQueryModel.MgrCodeIDEqual      = MgrCodeIDEqual;
            objQueryModel.AssistpersonsEqual  = AssistpersonsEqual;
            objQueryModel.TrancRevertEqual    = TrancRevertEqual;
            objQueryModel.ManagerRevertEqual  = ManagerRevertEqual;
            objQueryModel.IsfinishEqual       = IsfinishEqual;
            objQueryModel.StateEqual          = StateEqual;
            objQueryModel.BakEqual            = BakEqual;
            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    models = new TY_OA_MgrTaskDtlBLL().GetModels(objQueryModel, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(models);
        }
Exemple #5
0
        public TY_OA_MgrTaskDtlModel GetTY_OA_MgrTaskDtl(int Code)
        {
            TY_OA_MgrTaskDtlModel model = new TY_OA_MgrTaskDtlModel();

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

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    TY_OA_MgrTaskDtlBLL lbll = new TY_OA_MgrTaskDtlBLL();
                    list.Add(lbll.GetModel(Code, connection));
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(list);
        }
Exemple #7
0
        public List <TY_OA_MgrTaskDtlModel> GetTY_OA_MgrTaskDtlList(TY_OA_MgrTaskDtlQueryModel QueryModel)
        {
            List <TY_OA_MgrTaskDtlModel> models = new List <TY_OA_MgrTaskDtlModel>();

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