private void Sale_Access()
 {
     if (SecurityUtil.CheckAccess("Sale_Access"))
     {
         BOListSale      model = new BOListSale(AccountantPool.Instance.CurrentAccountant);
         FrmSaleRegister frm   = new FrmSaleRegister();
         frm.Model = model;
         ShowWindowsForm(frm);
     }
 }
 public void ShowSales(BOListSale model)
 {
     if (mApplicationController.CheckAccess(BOType.BOListSale, BOPropertyAttrType.Visible))
     {
         if (IsInvalid(mFrmSalesRegister))
         {
             mFrmSalesRegister = new DacII.WinForms.Sales.FrmSalesRegister(mApplicationController, model);
         }
         SetCurrentForm(mFrmSalesRegister);
     }
 }
        public FrmSalesRegister(ApplicationPresenter ap, BOListSale model)
            : base(ap)
        {
            InitializeComponent();

            //code added to ensure date time value changed event will be fired later when the datetime field value is set to now
            DateTime default_date = new DateTime(DateTime.Now.Year - 100, 1, 1);

            dtpEndDate.Value   = default_date;
            dtpStartDate.Value = default_date;

            mModel     = model;
            mViewModel = new BOViewModel(mModel);

            BindViews();
            RegisterEventHandlers();

            ConfigureDataGridView(dgvAll);
            ConfigureDataGridView(dgvQuote);
            ConfigureDataGridView(dgvOrder);
            ConfigureDataGridView(dgvOpenInvoice);
            ConfigureDataGridView(dgvCreditReturn);
            ConfigureDataGridView(dgvClosedInvoice);
        }