Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReturnTransactionUC"/> class.
 /// </summary>
 /// <param name="theGrid">The grid.</param>
 public ReturnTransactionUC(DataGridView theGrid)
 {
     this.theController = new ReturnTransactionController();
     DataGrid           = theGrid;
     this.InitializeComponent();
     UserControlType            = UserControls.Return;
     this.items                 = new BindingList <PurchaseTransaction_Item>();
     this.DataGrid.RowsAdded   += this.DataGridOnRowsChanged;
     this.DataGrid.RowsRemoved += this.DataGridOnRowsChanged;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor method.
        /// </summary>
        public Return()
        {
            InitializeComponent();
            this.returnController            = new ReturnController();
            this.returnTransactionController = new ReturnTransactionController();
            this.furnitureController         = new FurnitureController();
            rentalTransactionController      = new RentalTransactionController();

            this.employeeID           = EmployeeDashboard.employeeID;
            buttonReturn.Enabled      = false;
            buttonAddToReturn.Enabled = false;
            this.itemsToReturn        = new List <ReturnableItem>();
        }
        /// <summary>
        /// Controller
        /// </summary>
        public ViewReturnTransactionsUserControl()
        {
            InitializeComponent();
            dgvViewReturns.AllowUserToAddRows        = false;
            dgvViewReturns.RowHeadersVisible         = false;
            dgvViewReturns.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dgvViewReturns.AutoResizeColumns();
            dgvViewReturns.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            dgvViewReturns.AutoResizeRows();
            dgvViewReturns.AutoSizeRowsMode        = DataGridViewAutoSizeRowsMode.AllCells;
            dgvViewReturns.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            this.currentCustomer             = new Customer();
            this.returnTransactionController = new ReturnTransactionController();
            this.RefreshDataGrid();
        }
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="customer">customer object</param>
        /// <param name="returnTransactionID"> return transaction id</param>
        public ReturnTransactionItemsDialog(Customer customer, string returnTransactionID)
        {
            InitializeComponent();
            this.returnTransactionController = new ReturnTransactionController();

            dgReturnItems.AllowUserToAddRows        = false;
            dgReturnItems.RowHeadersVisible         = false;
            dgReturnItems.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dgReturnItems.AutoResizeColumns();
            dgReturnItems.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            dgReturnItems.AutoResizeRows();
            dgReturnItems.AutoSizeRowsMode        = DataGridViewAutoSizeRowsMode.AllCells;
            dgReturnItems.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            this.lblCustomerName.Text = customer.FirstName + " " + customer.LastName;
            this.lblMemberId.Text     = customer.CustomerId + "";

            int transactionID = int.Parse(returnTransactionID);

            this.RefreshGrid(transactionID);
        }
        /// <summary>
        /// Contructor of Return Shopping cart
        /// </summary>
        public ReturnShoppingCartUserControl()
        {
            InitializeComponent();
            this.currentCustomer             = new Customer();
            this.furnitureController         = new FurnitureController();
            this.rentalTransactionController = new RentalTransactionController();
            this.returnTransactionController = new ReturnTransactionController();

            dgvCartReturn.AllowUserToAddRows        = false;
            dgvCartReturn.RowHeadersVisible         = false;
            dgvCartReturn.DefaultCellStyle.WrapMode = DataGridViewTriState.False;
            dgvCartReturn.AutoResizeColumns();
            dgvCartReturn.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            dgvCartReturn.AutoResizeRows();
            dgvCartReturn.AutoSizeRowsMode        = DataGridViewAutoSizeRowsMode.AllCells;
            dgvCartReturn.Columns[3].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;

            this.txtLateFee.ReadOnly     = true;
            this.txtRefundTotal.ReadOnly = true;

            returnItemBindingSource.DataSource = returnCartItemList;
            //this.addReturn(1, 1, 1);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Constructor method.
 /// </summary>
 public ViewReturns()
 {
     InitializeComponent();
     this.returnTransactionController = new ReturnTransactionController();
 }