void frmFareMeterSetting_Load(object sender, EventArgs e) { try { var list = (from a in General.GetQueryable <Fleet_VehicleType>(null) orderby a.OrderNo select new { VehicleTypeId = a.Id, VehicleType = a.VehicleType }).ToList(); grdFareMeterSetting.RowCount = list.Count; for (int i = 0; i < list.Count; i++) { grdFareMeterSetting.Rows[i].Cells[COLS.VehicleTypeId].Value = list[i].VehicleTypeId.ToInt(); grdFareMeterSetting.Rows[i].Cells[COLS.VehicleType].Value = list[i].VehicleType.ToStr(); grdFareMeterSetting.Rows[i].Cells[COLS.HasMeter].Value = false; } Gen_SysPolicy obj = General.GetQueryable <Gen_SysPolicy>(null).FirstOrDefault(); if (obj != null) { objMaster.GetByPrimaryKey(obj.Id); DisplayRecord(); } } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
void frmBiddingTimeSettings_Load(object sender, EventArgs e) { DefaultDate(); Gen_SysPolicy obj = General.GetQueryable <Gen_SysPolicy>(null).FirstOrDefault(); if (obj != null) { objMaster.GetByPrimaryKey(obj.Id); objMaster.Edit(); DisplayRecord(); } }
public frmSinBinSettings() { InitializeComponent(); objMaster = new SysPolicyBO(); this.SetProperties((INavigation)objMaster); objMaster.GetByPrimaryKey(1); FormatGrid(); this.Load += new EventHandler(frmBookingTypes_Load); this.FormClosed += new FormClosedEventHandler(frmBookingTypes_FormClosed); }
private void frmDrivertemplet_Load(object sender, EventArgs e) { try { FormatSMSTempletGrid(); Gen_SysPolicy obj = General.GetQueryable <Gen_SysPolicy>(null).FirstOrDefault(); if (obj != null) { objMaster.GetByPrimaryKey(obj.Id); Display(); if (grdSMSTemplets.Rows.Count > 0) { //grdSMSTemplets.Rows[0].IsCurrent = true; //grdSMSTemplets.CurrentRow = null; } } TxtSMSTemplet.Select(); } catch { } }
public frmSurchargeRateSettings() { InitializeComponent(); objMaster = new SysPolicyBO(); this.SetProperties((INavigation)objMaster); Gen_SysPolicy obj = General.GetQueryable <Gen_SysPolicy>(null).FirstOrDefault(); if (obj != null) { objMaster.GetByPrimaryKey(obj.Id); objMaster.Edit(); } this.Load += FrmSurchargeRateSettings_Load; this.btnSave.Click += BtnSave_Click; this.btnExit1.Click += BtnExit1_Click; }