Ejemplo n.º 1
0
        public int Delete(TCheckPaymentModel ObjModel)
        {
            int num = 0;

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                connection.Open();
                SqlTransaction transaction = connection.BeginTransaction();
                try
                {
                    try
                    {
                        TCheckPaymentBLL tbll = new TCheckPaymentBLL();
                        transaction.Commit();
                    }
                    catch (SqlException exception)
                    {
                        transaction.Rollback();
                        connection.Close();
                        throw exception;
                    }
                    return(num);
                }
                finally
                {
                    connection.Close();
                }
            }
            return(num);
        }
Ejemplo n.º 2
0
        public TCheckPaymentModel GetTCheckPayment(int Code)
        {
            TCheckPaymentModel model = new TCheckPaymentModel();

            using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString()))
            {
                try
                {
                    connection.Open();
                    model = new TCheckPaymentBLL().GetModel(Code, connection);
                    connection.Close();
                }
                catch (SqlException exception)
                {
                    throw exception;
                }
            }
            return(model);
        }
Ejemplo n.º 3
0
        public int Update(TCheckPaymentModel ObjModel, SqlTransaction Transaction)
        {
            TCheckPaymentDAL tdal = new TCheckPaymentDAL(Transaction);

            return(tdal.Update(ObjModel));
        }