public frmVehicleTypeList() { InitializeComponent(); this.Load += new EventHandler(frmVehicleTypeList_Load); grdLister.CellDoubleClick += new GridViewCellEventHandler(grdLister_CellDoubleClick); grdLister.RowsChanging += new Telerik.WinControls.UI.GridViewCollectionChangingEventHandler(Grid_RowsChanging); objMaster = new VehicleTypeBO(); this.SetProperties((INavigation)objMaster); // grdLister.CellFormatting+=new CellFormattingEventHandler(grdLister_CellFormatting); grdLister.ShowRowHeaderColumn = false; this.Shown += new EventHandler(frmVehicleTypeList_Shown); grdLister.ShowGroupPanel = false; grdLister.AllowAddNewRow = false; grdLister.ShowRowHeaderColumn = false; grdLister.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick); // grdLister.TableElement.AlternatingRowColor = Color.AliceBlue; // grdLister.AutoCellFormatting = TR; // grdLister.EnableHotTracking = false; // grdLister.ViewCellFormatting += new CellFormattingEventHandler(MyGridView_ViewCellFormatting); }
void Grid_RowsChanging(object sender, GridViewCollectionChangingEventArgs e) { if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove) { objMaster = new VehicleTypeBO(); try { objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt()); objMaster.Delete(objMaster.Current); } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } e.Cancel = true; } } }
public frmVehicleOrder() { InitializeComponent(); this.Load += new EventHandler(frmVehicleOrder_Load); objMaster = new VehicleTypeBO(); this.SetProperties((INavigation)objMaster); }
public frmVehicleAttributes() { InitializeComponent(); objMaster = new VehicleTypeBO(); FormatGrid(); this.Load += new EventHandler(frmVehicleAttributes_Load); this.btnSave.Click += new EventHandler(btnSave_Click); this.btnExit1.Click += new EventHandler(btnExit1_Click); this.Shown += new EventHandler(frmVehicleAttributes_Shown); }
public frmVehicleType() { InitializeComponent(); objMaster = new VehicleTypeBO(); this.SetProperties((INavigation)objMaster); SetPeakOffPeakFares(AppVars.objPolicyConfiguration.EnablePeakOffPeakFares.ToBool() ? ToggleState.On : ToggleState.Off); // chkEnablePeakFares.Enabled = AppVars.objPolicyConfiguration.EnablePeakOffPeakFares.ToBool() ? true : false; this.Shown += new EventHandler(frmVehicleType_Shown); this.Load += new EventHandler(frmVehicleType_Load); }