private void FillCombo()
 {
     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);
 }
Exemplo n.º 2
0
 private void ddlDriver_Enter(object sender, EventArgs e)
 {
     if (ddlDriver.DataSource == null)
     {
         ComboFunctions.FillDriverNoCombo(ddlDriver);
     }
 }
 private void FillDriverNoComboIfNull()
 {
     if (ddlDriver.DataSource == null)
     {
         ComboFunctions.FillDriverNoCombo(ddlDriver, null);
     }
 }
Exemplo n.º 4
0
        private void FillCombo()
        {
            ComboFunctions.FillDriverWeeklyRentHistoryCombo(ddlDateRange);
            ComboFunctions.FillDriverNoCombo(ddlDriver);

            //ComboFunctions.FillDriverNoCombo(ddlDriver, c => c.DriverTypeId == 1);
        }
Exemplo n.º 5
0
        //void DropDownListElement_TextChanging(object sender, TextChangingEventArgs e)
        //{
        //    //this.ddl_Driver.DropDownListElement.TextBox.cle.Filter = ClearFilterItem;


        //    //this.ddl_Driver.Filter = FilterItem;

        //    string s = ddl_Driver.Text;

        //    this.ddl_Driver.FilterExpression = "DriverName LIKE '%" + s + "%'";
        //}



        //private bool FilterItem(RadListDataItem item)
        //{
        //    if (item == null)
        //        return false;

        //    if (item.Text.Contains(ddl_Driver.DropDownListElement.TextBox.TextBoxItem.Text))
        //    {
        //        return true;
        //    }
        //    return false;
        //}

        private void LoadData()
        {
            try
            {
                ComboFunctions.FillDriverNoCombo(ddl_Driver);
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 6
0
        void frmPlotDriver_Shown(object sender, EventArgs e)
        {
            if (IsPlotting)
            {
                if (AppVars.objPolicyConfiguration.EnablePDA.ToBool())
                {
                    ComboFunctions.FillFreezePlottedDriverNoCombo(ddl_Driver);
                }
                else
                {
                    ComboFunctions.FillDriverNoCombo(ddl_Driver);
                }

                ComboFunctions.FillZonesPlottedCombo(ddlZone);
                ComboFunctions.FillVehicleCombo(ddlVehicle);
            }
            else
            {
                Pg_Ordering.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                Pg_Main.Text = "Un-Plot";

                ddlZone.Enabled    = false;
                ddlVehicle.Enabled = false;
                lblZone.Enabled    = false;

                var list1 = General.GetQueryable <Fleet_DriverQueueList>(a => a.DriverId != null && a.Status == true);

                var query = from a in list1

                            orderby a.QueueDateTime
                            select new
                {
                    Id       = a.Id,
                    DriverNo = a.Fleet_Driver.DriverNo + " - " + a.Fleet_Driver.DriverName,
                };

                ComboFunctions.FillCombo(query.ToList(), ddl_Driver, "DriverNo", "Id");
            }

            ddl_Driver.RootElement.Focus();
            ddl_Driver.RootElement.Children[0].Focus();

            IsFormLoaded = true;


            if (DriverId != 0)
            {
                DriverQueueBO objMaster = new DriverQueueBO();
                objMaster.GetByPrimaryKey(DriverId);

                ddl_Driver.SelectedValue = objMaster.Current.DriverId.ToInt();
                ddlZone.SelectedValue    = objMaster.Current.ZoneId.ToInt();
                ddlVehicle.SelectedValue = objMaster.Current.FleetMasterId.ToInt();
            }
        }
Exemplo n.º 7
0
 public frmShifts()
 {
     InitializeComponent();
     objdriver = new DriverBO();
     objMaster = new DriverShiftsBO();
     FormateShiftGride();
     ComboFunctions.FillDriverNoCombo(ddlDriver);
     ComboFunctions.FillDriverShiftsCombo(ddlShifts);
     grdShifts.CellDoubleClick  += new GridViewCellEventHandler(grdShifts_CellDoubleClick);
     grdShifts.CommandCellClick += new CommandCellClickEventHandler(grid_CommandCellClick);
 }
        private void rptfrmDriverLoginHistory_Load(object sender, EventArgs e)
        {
            try
            {
                ComboFunctions.FillDriverNoCombo(ddl_Driver);

                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)
            {
            }
        }
Exemplo n.º 9
0
        public frmDriverTransactionReport(int val)
        {
            InitializeComponent();

            IsCheck    = val;
            this.Load += new EventHandler(frmInvoiceReport_Load);

            ComboFunctions.FillDriverNoCombo(ddlCompany);


            dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue());
        }
Exemplo n.º 10
0
        private void rptfrmJobHistoryReport_Load_1(object sender, EventArgs e)
        {
            try
            {
                ComboFunctions.FillDriverNoCombo(ddl_Driver);
                ComboFunctions.FillVehicleTypeCombo(ddlVehicle);

                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)
            {
            }
        }
        public frmAllocateDriver(long ID, int openFrom)
        {
            InitializeComponent();
            ObjMaster = new BookingBO();
            ObjMaster.GetByPrimaryKey(ID);


            ComboFunctions.FillDriverNoCombo(ddl_Driver);
            //  ComboFunctions.FillDriverNoQueueCombo(ddl_Driver);
            DisplayRecord();
            this.Shown     += new EventHandler(frmAllocateDriver_Shown);
            this.KeyDown   += new KeyEventHandler(frmAllocateDriver_KeyDown);
            this.IsOpenFrom = openFrom;
        }
Exemplo n.º 12
0
        public frmDriverMonthlyRentReport()
        {
            InitializeComponent();



            ComboFunctions.FillDriverNoCombo(ddlDriver, c => c.DriverTypeId == 1);
            //   rdoMonyhly.IsChecked = true;
            int    Month = DateTime.Now.Month.ToInt();
            string Year  = DateTime.Now.Year.ToStr();



            dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue());
        }
Exemplo n.º 13
0
        public frmDriverMonthlyCommisionReport()
        {
            InitializeComponent();

            this.Load += new EventHandler(frmInvoiceReport_Load);

            ComboFunctions.FillDriverNoCombo(ddlDriver, c => c.DriverTypeId == 2);
            rdoMonyhly.IsChecked = true;
            int    Month = DateTime.Now.Month.ToInt();
            string Year  = DateTime.Now.Year.ToStr();

            ddlWeekMonths.SelectedIndex = Month.ToInt();
            ddlMonth.SelectedIndex      = Month.ToInt();
            ddlYear.SelectedText        = Year.ToStr();
            ddlYear.Select();
        }
Exemplo n.º 14
0
 void chkAllDriver_ToggleStateChanged(object sender, StateChangedEventArgs args)
 {
     if (args.ToggleState == ToggleState.On)
     {
         ddlDriver.SelectedValue = null;
         ddlDriver.Enabled       = false;
         //ddlAllDriver.SelectedValue = 0;
     }
     else
     {
         if (ddlDriver.DataSource == null)
         {
             ComboFunctions.FillDriverNoCombo(ddlDriver);
         }
         ddlDriver.Enabled = true;
     }
 }
        public frmDriverCommisionTransactionExpensesReport3(int val)
        {
            InitializeComponent();

            IsCheck    = val;
            this.Load += new EventHandler(frmInvoiceReport_Load);

            ComboFunctions.FillDriverNoCombo(ddlCompany);

            if (ddlCompany.SelectedValue == null)
            {
                pnlCriteria.Visible = false;
            }

            dtpFromDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            dtpTillDate.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.LastDayOfMonthValue());
        }
        private void LoadAndSelectDriver()
        {
            try
            {
                ComboFunctions.FillDriverNoCombo(ddl_Driver);
                // ComboFunctions.FillDriverNoQueueCombo(ddl_Driver);

                IsLoaded = true;

                if (this.SelectedDriverId != null)
                {
                    ddl_Driver.SelectedValue = this.SelectedDriverId;
                }
            }
            catch (Exception ex)
            {
            }
        }
 private void FillCombo()
 {
     ComboFunctions.FillDriverCommissionCollectionHistoryCombo(ddlDateRange);
     //ComboFunctions.FillDriverNoCombo(ddlDriver);
     ComboFunctions.FillDriverNoCombo(ddlDriver, c => c.DriverTypeId == 2);
 }
Exemplo n.º 18
0
        private void frmDriverJobLogReport_Load(object sender, EventArgs e)
        {
            try
            {
                dtpFromDate.Value = DateTime.Now.Date;
                dtpFromTime.Value = DateTime.Now.Date;

                dtpTillDate.Value = DateTime.Now.Date;
                dtpTillTime.Value = DateTime.Now.Date;


                ComboFunctions.FillDriverNoCombo(ddl_Driver);



                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.HeaderText = "Pickup Point";
                col.Name       = "PickupPoint";
                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.ReadOnly      = true;
                colD.HeaderText    = "Total";
                colD.Name          = "Total";
                colD.Maximum       = 9999999;
                colD.FormatString  = "{0:#,###0.00}";
                grdLister.Columns.Add(colD);



                (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 = 130;
                grdLister.Columns["RefNumber"].Width  = 50;
                grdLister.Columns["Vehicle"].Width    = 70;

                grdLister.Columns["PickUpPoint"].Width = 200;
                grdLister.Columns["Destination"].Width = 200;

                grdLister.Columns["Charges"].Width = 45;

                grdLister.Columns["Total"].Width = 40;

                grdLister.Columns["PickUpDate"].HeaderText  = "Pickup Date-Time";
                grdLister.Columns["RefNumber"].HeaderText   = "Ref #";
                grdLister.Columns["PickUpPoint"].HeaderText = "Pickup Point";



                grdLister.AllowEditRow = true;
            }

            catch (Exception ex)
            {
            }
        }
Exemplo n.º 19
0
 public void FillCombo()
 {
     ComboFunctions.FillDriverNoCombo(ddlDrivers);
 }
Exemplo n.º 20
0
 private void FillCombo()
 {
     ComboFunctions.FillDriverNoCombo(ddlDriver);
     ddlDriver.PopupOpened += new EventHandler(ddlDriver_PopupOpened);
 }
 private void FillCombo()
 {
     ComboFunctions.FillDriverNoCombo(ddlDrivers, c => c.DriverTypeId == 1);
     ComboFunctions.FillRentPayReasonCombo(ddlRentPayReason);
 }
Exemplo n.º 22
0
 private void FillDriver()
 {
     ComboFunctions.FillDriverNoCombo(ddlDriver);
 }
 private void FillCombo()
 {
     ComboFunctions.FillDriverNoCombo(ddlDrivers, c => c.DriverTypeId == 2);
     //   ComboFunctions.FillCommissionReasonCombo(ddlCommissionPayReason);
 }
Exemplo n.º 24
0
        void frmDriverReport_Load(object sender, EventArgs e)
        {
            ComboFunctions.FillUsersCombo(ddlController);

            ComboFunctions.FillDriverNoCombo(ddl_Driver, c => c.HasPDA != null && c.HasPDA == true);
            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      = COLS.DRIVERID;
            grdLister.Columns.Add(col);

            col = new GridViewTextBoxColumn();
            //     col.IsVisible = false;
            col.ReadOnly   = true;
            col.HeaderText = "Action";
            col.Name       = COLS.ACTION;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.ReadOnly   = true;
            col.HeaderText = "Drv";
            col.Name       = COLS.DRIVERNO;
            grdLister.Columns.Add(col);

            GridViewDateTimeColumn colDt = new GridViewDateTimeColumn();

            colDt.Name       = COLS.PICKUPDATETIME;
            colDt.ReadOnly   = true;
            colDt.HeaderText = "Pickup Date Time";
            grdLister.Columns.Add(colDt);

            col            = new GridViewTextBoxColumn();
            col.HeaderText = "Pickup Point";
            col.Name       = COLS.PICKUPPOINT;
            col.ReadOnly   = true;
            grdLister.Columns.Add(col);


            col = new GridViewTextBoxColumn();
            //  col.IsVisible = false;
            col.ReadOnly   = true;
            col.Name       = "Destination";
            col.HeaderText = COLS.DESTINATION;
            grdLister.Columns.Add(col);



            colDt            = new GridViewDateTimeColumn();
            colDt.Name       = COLS.BLOCKEDON;
            colDt.ReadOnly   = true;
            colDt.HeaderText = "Blocked On";
            grdLister.Columns.Add(colDt);


            colDt            = new GridViewDateTimeColumn();
            colDt.Name       = COLS.UNBLOCKEDON;
            colDt.ReadOnly   = true;
            colDt.HeaderText = "UnBlocked On";
            grdLister.Columns.Add(colDt);


            col            = new GridViewTextBoxColumn();
            col.Name       = COLS.UNBLOCKBY;
            col.ReadOnly   = true;
            col.HeaderText = "UnBlock By";
            grdLister.Columns.Add(col);



            //(grdLister.Columns[COLS.PICKUPDATETIME] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm";
            // (grdLister.Columns[COLS.PICKUPDATETIME] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}";

            (grdLister.Columns[COLS.PICKUPDATETIME] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm";
            (grdLister.Columns[COLS.PICKUPDATETIME] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}";


            (grdLister.Columns[COLS.BLOCKEDON] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm";
            (grdLister.Columns[COLS.BLOCKEDON] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}";

            (grdLister.Columns[COLS.UNBLOCKEDON] as GridViewDateTimeColumn).CustomFormat = "dd/MM/yyyy HH:mm";
            (grdLister.Columns[COLS.UNBLOCKEDON] as GridViewDateTimeColumn).FormatString = "{0:dd/MM/yyyy HH:mm}";



            grdLister.Columns[COLS.DRIVERNO].Width       = 60;
            grdLister.Columns[COLS.PICKUPPOINT].Width    = 160;
            grdLister.Columns[COLS.DESTINATION].Width    = 160;
            grdLister.Columns[COLS.PICKUPDATETIME].Width = 100;
            grdLister.Columns[COLS.BLOCKEDON].Width      = 130;
            grdLister.Columns[COLS.UNBLOCKEDON].Width    = 130;
            grdLister.Columns[COLS.UNBLOCKBY].Width      = 100;
            grdLister.Columns[COLS.ACTION].Width         = 100;



            grdLister.AllowEditRow = true;
        }
Exemplo n.º 25
0
        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;
        }
        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";
        }
        void frmDriverReport_Load(object sender, EventArgs e)
        {
            //  ViewReport();

            ComboFunctions.FillDriverNoCombo(ddl_Driver, c => c.DriverTypeId == 1);
            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.Width      = 60;
            col.ReadOnly   = true;
            col.HeaderText = "Drv";
            col.Name       = COLS.DrvNo;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 1";
            col.Name       = COLS.AccountCode;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 2";
            col.Name       = COLS.AccountCode2;
            grdLister.Columns.Add(col);


            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 3";
            col.Name       = COLS.AccountCode3;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 4";
            col.Name       = COLS.AccountCode4;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 5";
            col.Name       = COLS.AccountCode5;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 6";
            col.Name       = COLS.AccountCode6;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 7";
            col.Name       = COLS.AccountCode7;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 8";
            col.Name       = COLS.AccountCode8;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 9";
            col.Name       = COLS.AccountCode9;
            grdLister.Columns.Add(col);



            col            = new GridViewTextBoxColumn();
            col.Width      = 100;
            col.ReadOnly   = true;
            col.HeaderText = "Acc 10";
            col.Name       = COLS.AccountCode10;
            grdLister.Columns.Add(col);



            col           = new GridViewTextBoxColumn();
            col.IsVisible = false;
            //  col.Width = 200;
            col.ReadOnly   = true;
            col.Name       = COLS.Account;
            col.HeaderText = "Account";
            grdLister.Columns.Add(col);



            GridViewDecimalColumn colD = new GridViewDecimalColumn();

            colD.IsVisible     = false;
            colD.Width         = 110;
            colD.DecimalPlaces = 0;
            colD.Minimum       = 0;
            colD.HeaderText    = "Total Jobs";
            colD.Name          = COLS.TotalJobs;
            colD.Maximum       = 9999999;

            grdLister.Columns.Add(colD);

            colD               = new GridViewDecimalColumn();
            colD.Width         = 90;
            colD.DecimalPlaces = 2;
            colD.Minimum       = 0;
            colD.HeaderText    = "Amount";
            colD.Name          = COLS.Amount;
            colD.Maximum       = 9999999;
            colD.FormatString  = "{0:#,###0.00}";
            grdLister.Columns.Add(colD);


            colD               = new GridViewDecimalColumn();
            colD.Width         = 90;
            colD.DecimalPlaces = 2;
            colD.Minimum       = 0;
            colD.HeaderText    = "Balance";
            colD.Name          = COLS.Balance;
            colD.Maximum       = 9999999;
            colD.FormatString  = "{0:#,###0.00}";
            grdLister.Columns.Add(colD);
        }
 private void LoadDate()
 {
     dtpFromDate.Value = DateTime.Now.ToDate();
     dtpTillDate.Value = DateTime.Now.ToDate();
     ComboFunctions.FillDriverNoCombo(ddl_Driver);
 }