Exemplo n.º 1
0
        public int ModifyPassAuditing(int Code, SqlTransaction Transaction)
        {
            TC_OA_UnusualModel objModel = this.GetModel(Code, Transaction);

            objModel.Auditing = 3;
            return(this.Update(objModel, Transaction));
        }
Exemplo n.º 2
0
        public int Delete(TC_OA_UnusualModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        num = new TC_OA_UnusualBLL().Delete(ObjModel.Code, transaction);
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Exemplo n.º 3
0
        public TC_OA_UnusualModel GetTC_OA_Unusual(int Code)
        {
            TC_OA_UnusualModel model = new TC_OA_UnusualModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new TC_OA_UnusualBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
Exemplo n.º 4
0
        public int Update(TC_OA_UnusualModel ObjModel, SqlTransaction Transaction)
        {
            TC_OA_UnusualDAL ldal = new TC_OA_UnusualDAL(Transaction);

            return(ldal.Update(ObjModel));
        }
Exemplo n.º 5
0
        public int Insert(TC_OA_UnusualModel ObjModel, SqlTransaction Transaction)
        {
            TC_OA_UnusualDAL ldal = new TC_OA_UnusualDAL(Transaction);

            return(ldal.Insert(ObjModel));
        }