public frmPurchaseOrderAddEdit()
 {
     InitializeComponent();
     _pURPurchaseHeaderWrapper = new PURPurchaseHeaderWrapper();
     LoadScreenData();
     //this.Enabled = true;
 }
 public frmPurchaseOrderSearch()
 {
     InitializeComponent();
     // base.toggelButton(base.btn_Close);
     base.lbl_FormHeader.Text = "فواتير الشراء";
     pURPurchaseHeaderWrapper = new PURPurchaseHeaderWrapper();
     invInventoryWerapper = new INVInventoryWrapper();
     InitiateGrid();
 }
        private void CommitInvoice()
        {
            if (CurrentHeaderID != null && CurrentHeaderID != 0)
            {
                PURPurchaseHeaderWrapper pURPurchaseHeaderWrapper = new PURPurchaseHeaderWrapper();
                pURPurchaseHeaderWrapper.CloseOrder((int)CurrentHeaderID);

            }
            else
            {
                MessageBox.Show("لابد من حفظ الفاتوره اولا ");
            }
        }