コード例 #1
0
        public VehicleDetailEditorForm(VehicleDetailEditorModel model)
        {
            InitializeComponent();
            _presenter = new VehicleDetailEditorPresenter(this, model);

            FieldsValidator.SetIconAlignment(txtLicenseNumber, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(dtpExpirationDate, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
        }
コード例 #2
0
        public VehicleEditorForm(VehicleEditorModel model)
        {
            InitializeComponent();
            _presenter = new VehicleEditorPresenter(this, model);

            // set validation alignment
            FieldsValidator.SetIconAlignment(lookUpCustomer, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(lookUpBrand, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(lookUpType, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(txtYearOfPurchase, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(txtLicenseNumber, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            FieldsValidator.SetIconAlignment(txtCode, System.Windows.Forms.ErrorIconAlignment.MiddleRight);
            ValidateExpireDate.SetIconAlignment(dtpExpirationDate, System.Windows.Forms.ErrorIconAlignment.MiddleRight);

            this.Load += VehicleEditorForm_Load;

            //lookupWheelDetailGv.EditValueChanged += lookupWheelDetailGv_EditValueChanged;
            gvVehicleWheel.PopupMenuShowing  += gvVehicleWheel_PopupMenuShowing;
            gvVehicleWheel.FocusedRowChanged += gvVehicleWheel_FocusedRowChanged;

            ////collumn setting for lookup specialSparepart in grid
            //LookUpColumnInfoCollection coll = lookupWheelDetailGv.Columns;

            //coll.Add(new LookUpColumnInfo("SerialNumber", 0, "Nomor Seri"));
            ////coll.Add(new LookUpColumnInfo("SparepartName", 0, "Sparepart"));
            //lookupWheelDetailGv.BestFitMode = BestFitMode.BestFitResizePopup;
            //lookupWheelDetailGv.SearchMode = SearchMode.AutoComplete;
            //lookupWheelDetailGv.AutoSearchColumnIndex = 1;

            //collumn setting for lookup specialSparepart in grid
            _repoItemLookUpEdit = new RepositoryItemLookUpEdit();
            _repoItemLookUpEdit.DisplayMember = "SerialNumber";
            _repoItemLookUpEdit.ValueMember   = "SerialNumber";
            LookUpColumnInfoCollection coll = _repoItemLookUpEdit.Columns;

            coll.Add(new LookUpColumnInfo("SerialNumber", 0, "Nomor Seri"));
            //coll.Add(new LookUpColumnInfo("SparepartName", 0, "Sparepart"));
            _repoItemLookUpEdit.BestFitMode                      = BestFitMode.BestFitResizePopup;
            _repoItemLookUpEdit.SearchMode                       = SearchMode.AutoComplete;
            _repoItemLookUpEdit.AutoSearchColumnIndex            = 1;
            _repoItemLookUpEdit.NullValuePromptShowForEmptyValue = false;
            _repoItemLookUpEdit.EditValueChanged                += _repoItemLookUpEdit_EditValueChanged;

            lookUpCustomer.EditValueChanged += lookUpCustomer_EditValueChanged;

            gvVehicleWheel.CustomRowCellEditForEditing += gvVehicleWheel_CustomRowCellEditForEditing;
        }