public SPKEditorForm(SPKEditorModel model) { InitializeComponent(); _presenter = new SPKEditorPresenter(this, model); //_availableMechanic = new List<string>(); _today = DateTime.Today; dtpDueDate.EditValue = _today; valCategory.SetIconAlignment(lookUpCategory, System.Windows.Forms.ErrorIconAlignment.MiddleRight); valVehicle.SetIconAlignment(LookUpVehicle, System.Windows.Forms.ErrorIconAlignment.MiddleRight); valDueDate.SetIconAlignment(dtpDueDate, System.Windows.Forms.ErrorIconAlignment.MiddleRight); this.Load += SPKEditorForm_Load; gvSparepart.PopupMenuShowing += gvSparepart_PopupMenuShowing; gvSparepart.FocusedRowChanged += gvSparepart_FocusedRowChanged; gvVehicleWheel.PopupMenuShowing += gvVehicleWheel_PopupMenuShowing; gvVehicleWheel.FocusedRowChanged += gvVehicleWheel_FocusedRowChanged; SPKSparepartList = new List <SPKDetailSparepartViewModel>(); SPKSparepartDetailList = new List <SPKDetailSparepartDetailViewModel>(); RemovedWHeelDetailList = new List <SpecialSparepartDetailViewModel>(); this.TotalSparepartPrice = 0; this.ContractWorkFee = 0; this.CostEstimation = 0; txtContractWorkFee.Enabled = false; txtContractor.Enabled = false; splitContainerMain.Panel2.Enabled = false; gridVehicleWheel.Enabled = false; ckeIsReturnRequired.Enabled = false; lookUpSerialNumber.Enabled = false; txtTotalSparepartPrice.ReadOnly = true; //column setting for lookup specialSparepart in grid LookUpColumnInfoCollection wheelDetailColl = lookupWheelDetailGv.Columns; wheelDetailColl.Add(new LookUpColumnInfo("SerialNumber", 0, "Nomor Seri")); lookupWheelDetailGv.BestFitMode = BestFitMode.BestFitResizePopup; lookupWheelDetailGv.SearchMode = SearchMode.AutoComplete; lookupWheelDetailGv.AutoSearchColumnIndex = 1; LookUpColumnInfoCollection SparepartWheelColl = lookUpSparepartWheelGv.Columns; SparepartWheelColl.Add(new LookUpColumnInfo("Name", 0, "Jenis Ban")); lookUpSparepartWheelGv.BestFitMode = BestFitMode.BestFitResizePopup; lookUpSparepartWheelGv.SearchMode = SearchMode.AutoComplete; lookUpSparepartWheelGv.AutoSearchColumnIndex = 1; //Vehicle wheel handler ckeIsUsedWheelRetrieved.CheckedChanged += ckeIsUsedWheelRetrieved_CheckedChanged; gvVehicleWheel.ShowingEditor += gvVehicleWheel_ShowingEditor; lookupWheelDetailGv.EditValueChanged += lookupWheelDetailGv_EditValueChanged; lookupWheelDetailGv.EditValueChanging += lookupWheelDetailGv_EditValueChanging; }
public SPKWheelChange(SPKEditorModel model) { InitializeComponent(); this._presenter = new SPKWheelChangePresenter(this, model); this.Load += SPKWheelChange_Load; this.gvVehicleWheel.FocusedRowChanged += gvVehicleWheel_FocusedRowChanged; _wheelDetailChanged = new List <SpecialSparepartDetailViewModel>(); }