private void FillCombos() { ComboFunctions.FillSecGroupsComboExcRoot(ddlGroups); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); ThemeList themeList = ThemeResolutionService.GetAvailableThemes(); if (themeList.Count() > 0) { ddlThemes.DisplayMember = "ThemeName"; ddlThemes.ValueMember = "ThemeName"; ddlThemes.AutoCompleteMode = AutoCompleteMode.SuggestAppend; ddlThemes.DataSource = themeList.Distinct().Where(t => !t.ThemeName.EndsWith("*") && t.ThemeName != "BreezeExtended").OrderBy(t => t.ThemeName).ToList(); } ddlThemes.SelectedIndex = -1; ddlThemes.NullText = "Select"; ddlGroups.SelectedIndex = -1; if (ddlSubCompany.Items.Count > 0) { chkAllowTransferBooking.Visible = true; } }
private void DdlSubCompanyId_Enter(object sender, EventArgs e) { if (ddlSubCompanyId.DataSource == null) { ComboFunctions.FillSubCompanyCombo(ddlSubCompanyId); } }
public frmCompanyVehcile() { InitializeComponent(); InitializeConstructor(); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); ComboFunctions.FillVehicleTypeCombo(ddlVehicleType); ComboFunctions.FillVehicleColorsCombo(ddlVehicleColor); ComboFunctions.FillFuelTypeCombo(ddlFuelType); btnInsuranceExpiryBrowsing.Click += new EventHandler(btnInsuranceExpiryBrowsing_Click); btnMOTExpiryBrowsing.Click += new EventHandler(btnMOTExpiryBrowsing_Click); btnRoadTaxExpiryBrowsing.Click += new EventHandler(btnRoadTaxExpiryBrowsing_Click); btnPlateExpiryBrowsing.Click += new EventHandler(btnPlateExpiryBrowsing_Click); btnPlateExpiryBrowsing2.Click += new EventHandler(btnPlateExpiryBrowsing2_Click); btnPlateExpiryBrowsing3.Click += new EventHandler(btnPlateExpiryBrowsing3_Click); btnVehicleBookBrowsing.Click += new EventHandler(btnVehicleBookBrowsing_Click); btnPlateExpiryView.Click += new EventHandler(btnPlateExpiryView_Click); btnPlateExpiryView2.Click += new EventHandler(btnPlateExpiryView2_Click); btnPlateExpiryView3.Click += new EventHandler(btnPlateExpiryView3_Click); btnMOTExpiryView.Click += new EventHandler(btnMOTExpiryView_Click); btnInsuranceExpiryView.Click += new EventHandler(btnInsuranceExpiryView_Click); btnRoadTaxExpiryView.Click += new EventHandler(btnRoadTaxExpiryView_Click); btnVehicleBookView.Click += new EventHandler(btnVehicleBookView_Click); btnInsuranceExpiryClear.Click += new EventHandler(btnInsuranceExpiryClear_Click); btnMOTExpiryClear.Click += new EventHandler(btnMOTExpiryClear_Click); btnPlateExpiryClear.Click += new EventHandler(btnPlateExpiryClear_Click); btnPlateExpiryClear2.Click += new EventHandler(btnPlateExpiryClear2_Click); btnPlateExpiryClear3.Click += new EventHandler(btnPlateExpiryClear3_Click); btnRoadTaxExpiryClear.Click += new EventHandler(btnRoadTaxExpiryClear_Click); btnVehicleBookClear.Click += new EventHandler(btnVehicleBookClear_Click); }
void rptfrmCompnayVehicle_Load(object sender, EventArgs e) { ComboFunctions.FillSubCompanyCombo(ddlSubCompany);; if (ddlSubCompany.Items.Count() == 1) { ddlSubCompany.SelectedIndex = 0; } ComboFunctions.FillVehicleTypeCombo(ddlVehicleType); }
private void rptfrmDriverLoginHistory_Load(object sender, EventArgs e) { try { // ComboFunctions.FillDriverNoCombo(ddl_Driver, c => c.DriverTypeId == Enums.DRIVERTYPES.RENT); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); IsLoaded = true; } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
private void FillCombos() { ComboFunctions.FillVehicleTypeCombo(ddlVehicleType); ComboFunctions.FillCompanyCombo(ddlCompany); ComboFunctions.FillSubCompanyCombo(ddlSubCompanyId); if (ddlSubCompanyId.Items.Count == 0) { ddlSubCompanyId.SelectedIndex = 0; } }
private void frmCompanyInvoice_Load(object sender, EventArgs e) { DateTime?fromDate = AppVars.objPolicyConfiguration.RentFromDateTime.ToDateTimeorNull(); DateTime?toDate = AppVars.objPolicyConfiguration.RentToDateTime.ToDateTimeorNull(); if (fromDate != null && toDate != null) { int subtracted = 7 - (int)fromDate.Value.DayOfWeek; int DaysToSubtract = (int)DateTime.Now.DayOfWeek; DateTime dtFrom = DateTime.Now.Subtract(TimeSpan.FromDays(DaysToSubtract)); // fromDate = new DateTime(dtFrom.Year, dtFrom.Month, dtFrom.Day - fromDate.Value.DayOfWeek.ToInt()+1, fromDate.Value.Hour, fromDate.Value.Minute, 0, 0); if (subtracted == 7) { subtracted = 6; } fromDate = new DateTime(dtFrom.Year, dtFrom.Month, dtFrom.AddDays(-subtracted).Day, fromDate.Value.Hour, fromDate.Value.Minute, 0, 0); DateTime dtTo = DateTime.Now.Subtract(TimeSpan.FromDays(DaysToSubtract)); toDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, dtTo.AddDays(toDate.Value.DayOfWeek.ToInt()).Day, toDate.Value.Hour, toDate.Value.Minute, 59, 999); dtpFromDate.Value = fromDate; dtpTillDate.Value = toDate; } else { dtpFromDate.Value = DateTime.Now.AddDays(-7).ToDate(); dtpTillDate.Value = DateTime.Now.ToDate(); } GetDrivers(); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); if (ddlSubCompany.Items.Count > 1) { ddlSubCompany.SelectedIndex = 1; } else { ddlSubCompany.SelectedIndex = 0; } }
public rptfrmCustomerFeedBackReport() { InitializeComponent(); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); this.btnPrint.Click += new EventHandler(btnPrint_Click); this.chkRating.ToggleStateChanged += new StateChangedEventHandler(chkRating_ToggleStateChanged); for (int i = 1; i <= 5; i++) { ddlRating.Items.Add(i.ToStr()); } ddlSubCompany.Enter += DdlSubCompany_Enter; }
private void rptfrmDriverLoginHistory_Load(object sender, EventArgs e) { try { ComboFunctions.FillSubCompanyCombo(ddSubCompany); if (ddSubCompany.Items.Count == 1) { ddSubCompany.SelectedIndex = 0; } //ComboFunctions.Fill(ddSubCompany); dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue()); } catch (Exception ex) { } }
void frmDriverReport_Load(object sender, EventArgs e) { ComboFunctions.FillCompanyCombo(ddlCompany, c => c.IsAgent != null && c.IsAgent == true); ComboFunctions.FillCompanyGroupCombo(ddlGroup); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue()); IsLoaded = true; // this.TemplatePath = General.GetObject<UM_Form_Template>(c => c.UM_Form.FormName == this.Name && c.IsDefault == true).DefaultIfEmpty().TemplateName.ToStr().Trim(); //if (this.TemplatePath.ToStr().ToLower() == "template3" || this.TemplatePath.ToStr().ToLower() == "template4") //{ // chkShowCharges.Visible = true; //} // chkShowCharges.Visible = true; ddlSubCompany.SelectedValue = AppVars.objSubCompany.Id; ddlSubCompany.SelectedValueChanged += new EventHandler(ddlSubCompany_SelectedValueChanged); }
void frmDriverReport_Load(object sender, EventArgs e) { if (AppVars.listUserRights.Count(c => c.formName == this.Name && c.functionId == "SPECIAL") > 0) { ChkRent.Visible = true; txtRent.Visible = true; } // ViewReport(); ComboFunctions.FillDriverNoCombo(ddl_Driver, c => c.DriverTypeId == 1 && (c.SubcompanyId == AppVars.DefaultDriverSubCompanyId || AppVars.DefaultDriverSubCompanyId == 0)); dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue()); dtpTillDate.Value = dtpTillDate.Value.Value.AddHours(23).AddMinutes(59); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); if (ddlSubCompany.Items.Count > 1) { ddlSubCompany.SelectedIndex = 1; } else { ddlSubCompany.SelectedIndex = 0; } GridViewTextBoxColumn col = new GridViewTextBoxColumn(); col.IsVisible = false; col.Name = "Id"; grdLister.Columns.Add(col); GridViewDateTimeColumn colDt = new GridViewDateTimeColumn(); colDt.Name = "PickupDate"; colDt.ReadOnly = true; colDt.HeaderText = "Pickup Date-Time"; grdLister.Columns.Add(colDt); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Ref #"; col.Name = "RefNumber"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.HeaderText = "Vehicle"; col.Name = "Vehicle"; col.ReadOnly = true; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.Name = "Account"; col.HeaderText = "Account"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Pickup Point"; col.Name = "PickupPoint"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); col.ReadOnly = true; col.HeaderText = "Via"; col.Name = "Via"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Destination"; col.Name = "Destination"; grdLister.Columns.Add(col); GridViewDecimalColumn colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "Charges"; colD.Name = "Charges"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "Parking"; colD.Name = "Parking"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "Waiting"; colD.Name = "Waiting"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "Extra Drop"; colD.Name = "ExtraDrop"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "M & G"; colD.Name = "MeetAndGreet"; colD.Maximum = 9999999; colD.IsVisible = false; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.HeaderText = "Congtion Charge"; colD.Name = "CongtionCharge"; colD.Maximum = 9999999; colD.IsVisible = false; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Total"; colD.Name = "Total"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; colD.Expression = "Charges+MeetAndGreet+CongtionCharge+ExtraDrop"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Amount"; colD.Name = "Amount"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); // grdLister.Columns["Id"].IsVisible = false; (grdLister.Columns["PickUpDate"] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm"; (grdLister.Columns["PickUpDate"] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}"; grdLister.Columns["PickUpDate"].Width = 90; grdLister.Columns["RefNumber"].Width = 40; grdLister.Columns["Vehicle"].Width = 45; grdLister.Columns["Account"].Width = 60; grdLister.Columns["PickUpPoint"].Width = 85; grdLister.Columns["Via"].Width = 40; grdLister.Columns["Destination"].Width = 85; grdLister.Columns["Charges"].Width = 45; grdLister.Columns["Parking"].Width = 45; grdLister.Columns["Waiting"].Width = 50; grdLister.Columns["ExtraDrop"].Width = 55; grdLister.Columns["MeetAndGreet"].Width = 40; grdLister.Columns["CongtionCharge"].Width = 85; grdLister.Columns["Total"].Width = 40; grdLister.Columns["Amount"].Width = 50; grdLister.Columns["PickUpDate"].HeaderText = "Pickup Date-Time"; grdLister.Columns["RefNumber"].HeaderText = "Ref #"; grdLister.Columns["PickUpPoint"].HeaderText = "Pickup Point"; grdLister.Columns["ExtraDrop"].HeaderText = "Extra Drop"; grdLister.Columns["MeetAndGreet"].HeaderText = "M & G"; grdLister.Columns["CongtionCharge"].HeaderText = "Congtion Charge"; AddUpdateColumn(grdLister); grdLister.AllowEditRow = true; }
private void FillCombo() { ComboFunctions.FillCompanyCombo(ddlCompany); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); }
void frmIncomeReport_Load(object sender, EventArgs e) { // ViewReport(); TimeSpan tillTime = TimeSpan.Zero; TimeSpan.TryParse("23:59:59", out tillTime); dtpTillDate.Value = (new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue()).Date); dtptilltime.Value = dtpTillDate.Value.Value.Date + tillTime; ComboFunctions.FillDriverNoCombo(ddlDriver); ComboFunctions.FillSubCompanyCombo(ddlSubCompany); dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue()); GridViewTextBoxColumn col = new GridViewTextBoxColumn(); col.IsVisible = false; col.Name = "Id"; grdLister.Columns.Add(col); GridViewDateTimeColumn colDt = new GridViewDateTimeColumn(); colDt.Name = "PickupDate"; colDt.ReadOnly = true; colDt.HeaderText = "Pickup Date-Time"; grdLister.Columns.Add(colDt); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Ref #"; col.Name = "RefNumber"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.HeaderText = "Vehicle"; col.Name = "Vehicle"; col.ReadOnly = true; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.Name = "Account"; col.HeaderText = "Account"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Pickup Point"; col.Name = "PickupPoint"; grdLister.Columns.Add(col); //Via col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Via"; col.Name = "Via"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = "Destination"; col.Name = "Destination"; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); col.IsVisible = false; col.HeaderText = "Comm"; col.Name = COLS.Comm; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); col.IsVisible = false; col.HeaderText = COLS.DriverId; col.Name = COLS.DriverId; grdLister.Columns.Add(col); col = new GridViewTextBoxColumn(); // col.IsVisible = false; col.ReadOnly = true; col.HeaderText = COLS.Driver; col.Name = COLS.Driver; grdLister.Columns.Add(col); GridViewDecimalColumn colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Charges"; colD.Name = "Charges"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Parking"; colD.Name = "Parking"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Waiting"; colD.Name = "Waiting"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.HeaderText = "Extra Drop"; colD.Name = "ExtraDrop"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; grdLister.Columns.Add(colD); //colD = new GridViewDecimalColumn(); //colD.DecimalPlaces = 2; //colD.Minimum = 0; //colD.HeaderText = "M & G"; //colD.ReadOnly = true; //colD.Name = "MeetAndGreet"; //colD.Maximum = 9999999; //colD.FormatString = "{0:#,###0.00}"; //grdLister.Columns.Add(colD); //colD = new GridViewDecimalColumn(); //colD.DecimalPlaces = 2; //colD.Minimum = 0; //colD.ReadOnly = true; //colD.HeaderText = "Congestion"; //colD.Name = "CongtionCharge"; //colD.Maximum = 9999999; //colD.FormatString = "{0:#,###0.00}"; //grdLister.Columns.Add(colD); colD = new GridViewDecimalColumn(); colD.DecimalPlaces = 2; colD.Minimum = 0; colD.ReadOnly = true; colD.ReadOnly = true; colD.HeaderText = "Total"; colD.Name = "Total"; colD.Maximum = 9999999; colD.FormatString = "{0:#,###0.00}"; colD.Expression = "Charges+Parking+Waiting+ExtraDrop"; //colD.Expression = "Charges+Parking+Waiting+ExtraDrop+MeetAndGreet+CongtionCharge"; grdLister.Columns.Add(colD); // grdLister.Columns["Id"].IsVisible = false; (grdLister.Columns["PickUpDate"] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm"; (grdLister.Columns["PickUpDate"] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}"; grdLister.Columns["PickUpDate"].Width = 90; grdLister.Columns["RefNumber"].Width = 40; grdLister.Columns["Vehicle"].Width = 50; grdLister.Columns["Account"].Width = 60; grdLister.Columns["PickUpPoint"].Width = 110; grdLister.Columns["Destination"].Width = 110; grdLister.Columns[COLS.Driver].Width = 40; grdLister.Columns["Charges"].Width = 45; grdLister.Columns["Parking"].Width = 45; grdLister.Columns["Waiting"].Width = 50; grdLister.Columns["ExtraDrop"].Width = 60; //grdLister.Columns["MeetAndGreet"].Width = 60; //grdLister.Columns["CongtionCharge"].Width = 70; grdLister.Columns["Total"].Width = 40; grdLister.Columns["Via"].Width = 80; grdLister.Columns["PickUpDate"].HeaderText = "Pickup Date-Time"; grdLister.Columns["RefNumber"].HeaderText = "Ref #"; grdLister.Columns["PickUpPoint"].HeaderText = "Pickup Point"; grdLister.Columns["ExtraDrop"].HeaderText = "Extra Drop"; }