public PurchasingEditorForm(PurchasingEditorModel model)
        {
            InitializeComponent();
            _presenter = new PurchasingEditorPresenter(this, model);

            // set validation alignment
            valSupplier.SetIconAlignment(cbSupplier, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            valDate.SetIconAlignment(txtDate, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            gvPurchasingDetail.PopupMenuShowing += gvPurchasingDetail_PopupMenuShowing;
            gvPurchasingDetail.FocusedRowChanged += gvPurchasingDetail_FocusedRowChanged;
            cbSparepartGv.EditValueChanged += cbSparepartGv_EditValueChanged;
            gvPurchasingDetail.ShowingEditor += gvPurchasingDetail_ShowingEditor;
            gvPurchasingDetail.FocusedRowObjectChanged += gvPurchasingDetail_FocusedRowObjectChanged;

            this.Load += PurchasingEditorForm_Load;
        }
        public PurchasingEditorForm(PurchasingEditorModel model)
        {
            InitializeComponent();
            _presenter = new PurchasingEditorPresenter(this, model);

            // set validation alignment
            valSupplier.SetIconAlignment(cbSupplier, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            valDate.SetIconAlignment(txtDate, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            gvPurchasingDetail.PopupMenuShowing        += gvPurchasingDetail_PopupMenuShowing;
            gvPurchasingDetail.FocusedRowChanged       += gvPurchasingDetail_FocusedRowChanged;
            cbSparepartGv.EditValueChanged             += cbSparepartGv_EditValueChanged;
            gvPurchasingDetail.ShowingEditor           += gvPurchasingDetail_ShowingEditor;
            gvPurchasingDetail.FocusedRowObjectChanged += gvPurchasingDetail_FocusedRowObjectChanged;

            this.Load += PurchasingEditorForm_Load;
        }