private void InitializeConstructor()
        {
            ComboFunctions.FillCompanyCombo(ddlCompany);
            ComboFunctions.FillBookingTypeCombo(ddlBookingType);
            ddlBookingType.SelectedValue = Enums.BOOKING_TYPES.LOCAL;

            dtpInvoiceDate.Value = DateTime.Now.ToDate();
            dtpDueDate.Value     = DateTime.Now.ToDate().AddMonths(1);
            FormatChargesGrid();

            grdLister.ShowGroupPanel      = false;
            grdLister.AutoCellFormatting  = true;
            grdLister.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            grdLister.ShowRowHeaderColumn = false;

            objMaster = new InvoiceBO();
            this.SetProperties((INavigation)objMaster);

            grdLister.AllowAddNewRow = 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());



            grdLister.CommandCellClick += new CommandCellClickEventHandler(grdLister_CommandCellClick);
        }
 public override void OnNew()
 {
     txtInvoiceNo.Text = string.Empty;
     ComboFunctions.FillCompanyCombo(ddlCompany);
     chkDepartmentWise.Checked = false;
     chkCostCenterWise.Checked = false;
     grdLister.Rows.Clear();
     txtInvoiceAmount.Text = string.Empty;
 }
        public rptfrmJobActivity()
        {
            InitializeComponent();

            ComboFunctions.FillCompanyCombo(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());
        }
 private void rptfrmAccountInvoiceSummary_Load(object sender, System.EventArgs e)
 {
     this.FormTitle    = "Account Invoice Summary";
     dtpTillDate.Value = DateTime.Now.ToDate();
     dtpFromDate.Value = DateTime.Now.ToDate().AddMonths(-1);
     ComboFunctions.FillCompanyCombo(ddlCompany);
     ddlCompany.Enabled = false;
     chkAll.Checked     = true;
 }
        void frmDriverReport_Load(object sender, EventArgs e)
        {
            ComboFunctions.FillCompanyCombo(ddlCompany);

            ComboFunctions.FillDriverNoComboSorted(ddlDriver);
            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;
        }
 public frmCompanyCostCenter(int companyId)
 {
     InitializeComponent();
     ComboFunctions.FillCompanyCombo(ddlCompany);
     this.Shown += new EventHandler(frmCompanyDepartments_Shown);
     objMaster   = new CompanyCostCenterBO();
     this.SetProperties((INavigation)objMaster);
     ddlCompany.SelectedValue = companyId;
     this.CompanyId           = companyId;
 }
        public frmPreAccInvoiceReport()
        {
            InitializeComponent();
            this.Load += new EventHandler(frmInvoiceReport_Load);

            ComboFunctions.FillCompanyCombo(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());
        }
        private void rptfrmDriverLoginHistory_Load(object sender, EventArgs e)
        {
            try
            {
                ComboFunctions.FillCompanyCombo(ddl_Company, c => c.AccountTypeId == Enums.ACCOUNT_TYPE.CASH);

                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 frmCompanyWebLogin(int companyId)
        {
            InitializeComponent();
            ComboFunctions.FillCompanyCombo(ddlCompany);
            this.Shown += new EventHandler(frmCompanyDepartments_Shown);
            objMaster   = new CompanyWebLoginBO();
            this.SetProperties((INavigation)objMaster);
            ddlCompany.SelectedValue = companyId;
            this.CompanyId           = companyId;


            chkActivateLogin.Checked = true;
        }
Exemplo n.º 10
0
        private void FillCombos()
        {
            ComboFunctions.FillVehicleTypeCombo(ddlVehicleType);
            ComboFunctions.FillCompanyCombo(ddlCompany);



            ComboFunctions.FillSubCompanyCombo(ddlSubCompanyId);

            if (ddlSubCompanyId.Items.Count == 0)
            {
                ddlSubCompanyId.SelectedIndex = 0;
            }
        }
        public frmComplaint(int Id, List <Complaint> listofComplaints, long jobId, string jobRefNo, string customerName, string customerPhoneNo, string customerAddress, bool IsHide)
        {
            try
            {
                InitializeComponent();
                InitializeConstructor();



                grdLister.ShowRowHeaderColumn = false;

                ComboFunctions.FillCompanyCombo(ddlAccount);



                IsHidePopulateDate = IsHide;

                txtJobRef.Text = jobRefNo;
                txtJobRef.Tag  = jobId;

                txtJobRef.Enabled = false;



                if (Id != 0)
                {
                    this.listOfBookingComplaints = listofComplaints;

                    objMaster.GetByPrimaryKey(Id);

                    DisplayRecord();
                }
                else
                {
                    grdLister.Enabled = false;

                    radPanel2.Enabled = false;

                    btnOnNew.Enabled = false;

                    txtCustomerName.Text  = customerName.ToStr();
                    txtAddressDetail.Text = customerAddress.ToStr();
                    txtPhoneNo.Text       = customerPhoneNo.ToStr();
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 12
0
        void chkAllCompany_ToggleStateChanged(object sender, StateChangedEventArgs args)
        {
            if (args.ToggleState == ToggleState.On)
            {
                ddlCompany.SelectedValue = null;
                ddlCompany.Enabled       = false;
            }
            else
            {
                if (ddlCompany.DataSource == null)
                {
                    ComboFunctions.FillCompanyCombo(ddlCompany);
                }

                ddlCompany.Enabled = true;
            }
        }
Exemplo n.º 13
0
        private void chkAllAcc_ToggleStateChanged(object sender, StateChangedEventArgs args)
        {
            if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On)
            {
                if (ddlCompany.DataSource == null)
                {
                    ComboFunctions.FillCompanyCombo(ddlCompany);
                }

                ddlCompany.Enabled = true;
            }
            else
            {
                ddlCompany.Enabled       = false;
                ddlCompany.SelectedValue = null;
            }
        }
Exemplo n.º 14
0
        private void InitializeConstructor()
        {
            var obj = General.GetObject <Gen_SysPolicy_DocumentNumberSetup>(c => c.DocumentId == Enums.GEN_DOCUMENTS.INVOICENO && (c.AutoIncrement == null || c.AutoIncrement == false));

            if (obj != null)
            {
                txtInvoiceNo.ReadOnly = false;
                txtInvoiceNo.Enabled  = true;
                this.AutoInc          = false;
            }


            ComboFunctions.FillCompanyCombo(ddlCompany);
            ComboFunctions.FillBookingTypeCombo(ddlBookingType);
            ddlBookingType.SelectedValue = Enums.BOOKING_TYPES.LOCAL;

            dtpInvoiceDate.Value = DateTime.Now.ToDate();
            dtpDueDate.Value     = DateTime.Now.ToDate().AddMonths(1);
            FormatChargesGrid();

            grdLister.ShowGroupPanel = false;
            // grdLister.AutoCellFormatting = true;
            grdLister.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            grdLister.ShowRowHeaderColumn = false;

            objMaster = new InvoiceBO();
            this.SetProperties((INavigation)objMaster);

            grdLister.AllowAddNewRow = 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());



            grdLister.CommandCellClick   += new CommandCellClickEventHandler(grdLister_CommandCellClick);
            grdLister.ContextMenuOpening += new ContextMenuOpeningEventHandler(grdLister_ContextMenuOpening);
        }
Exemplo n.º 15
0
        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 frmCompanyIncomeReport_Load(object sender, EventArgs e)
        {
            //  ViewReport();
            // ComboFunctions.FillDriverNoCombo(ddlDriver);


            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.FillCompanyCombo(ddlCompany);
            ComboFunctions.FillSubCompanyCombo(ddlSubCompany);

            ddlCompany.Enabled = 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      = "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 = COLS.Driver;
            col.Name       = COLS.Driver;
            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);



            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 = 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";
            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[COLS.Driver].Width   = 40;
            grdLister.Columns["PickUpPoint"].Width = 110;
            grdLister.Columns["Destination"].Width = 110;

            // grdLister.Columns[COLS.Driver].Width = 40;
            grdLister.Columns["Account"].Width   = 60;
            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["PickUpDate"].HeaderText  = "Pickup Date-Time";
            grdLister.Columns["RefNumber"].HeaderText   = "Ref #";
            grdLister.Columns["PickUpPoint"].HeaderText = "Pickup Point";
            grdLister.Columns["ExtraDrop"].HeaderText   = "Extra Drop";
        }
Exemplo n.º 17
0
 private void FillCombo()
 {
     ComboFunctions.FillCompanyCombo(ddlCompany);
     ComboFunctions.FillSubCompanyCombo(ddlSubCompany);
 }
        public override void DisplayRecord()
        {
            if (objMaster.Current == null)
            {
                return;
            }


            btnExportPDF.Enabled = true;
            btnPrint.Enabled     = true;
            btnSendEmail.Enabled = true;

            ddlBookingType.SelectedValue = objMaster.Current.BookingTypeId;

            txtInvoiceNo.Text    = objMaster.Current.InvoiceNo.ToStr();
            dtpInvoiceDate.Value = objMaster.Current.InvoiceDate.ToDate();



            if (objMaster.Current.CompanyId != null && objMaster.Current.Gen_Company.IsClosed.ToBool())
            {
                var data = (List <Gen_Company>)ddlCompany.DataSource;
                data.Add(objMaster.Current.Gen_Company);
                ComboFunctions.FillCompanyCombo(ddlCompany, data);
            }

            ddlCompany.SelectedValue    = objMaster.Current.CompanyId;
            dtpDueDate.Value            = objMaster.Current.DueDate.ToDate();
            ddlDepartment.SelectedValue = objMaster.Current.DepartmentId;
            chkDepartmentWise.Checked   = objMaster.Current.DepartmentWise.ToBool();

            ddlCostCenter.SelectedValue = objMaster.Current.CostCenterId;
            chkCostCenterWise.Checked   = objMaster.Current.CostCenterWise.ToBool();

            int cnt  = objMaster.Current.Invoice_Charges.Count;
            var list = objMaster.Current.Invoice_Charges;

            grdLister.RowCount = cnt;
            Booking objBooking = null;

            for (int i = 0; i < cnt; i++)
            {
                grdLister.Rows[i].Cells[COLS.ID].Value        = list[i].Id;
                grdLister.Rows[i].Cells[COLS.InvoiceId].Value = list[i].InvoiceId;
                grdLister.Rows[i].Cells[COLS.BookingId].Value = list[i].BookingId;

                objBooking = list[i].Booking;

                if (objBooking != null)
                {
                    grdLister.Rows[i].Cells[COLS.Payment_ID].Value = objBooking.InvoicePaymentTypeId;
                    grdLister.Rows[i].Cells[COLS.PickupDate].Value = objBooking.PickupDateTime;
                    grdLister.Rows[i].Cells[COLS.OrderNo].Value    = objBooking.OrderNo;
                    grdLister.Rows[i].Cells[COLS.PupilNo].Value    = objBooking.PupilNo;

                    grdLister.Rows[i].Cells[COLS.BookedBy].Value = objBooking.Gen_Company_Department.DefaultIfEmpty().DepartmentName.ToStr();


                    grdLister.Rows[i].Cells[COLS.Vehicle].Value = objBooking.Fleet_VehicleType.VehicleType;

                    grdLister.Rows[i].Cells[COLS.VehicleID].Value = objBooking.VehicleTypeId;
                    grdLister.Rows[i].Cells[COLS.RefNumber].Value = objBooking.BookingNo;
                    //grdLister.Rows[i].Cells[COLS.Charges].Value = objBooking.FareRate.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.Charges].Value = objBooking.CompanyPrice.ToDecimal();


                    grdLister.Rows[i].Cells[COLS.Parking].Value        = objBooking.ParkingCharges.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.PickupPoint].Value    = !string.IsNullOrEmpty(objBooking.FromDoorNo) ? objBooking.FromDoorNo + " - " + objBooking.FromAddress.ToStr():objBooking.FromAddress.ToStr();
                    grdLister.Rows[i].Cells[COLS.Destination].Value    = !string.IsNullOrEmpty(objBooking.ToDoorNo) ? objBooking.ToDoorNo + " - " + objBooking.ToAddress.ToStr() : objBooking.ToAddress.ToStr();
                    grdLister.Rows[i].Cells[COLS.Waiting].Value        = objBooking.WaitingCharges.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.ExtraDrop].Value      = objBooking.ExtraDropCharges.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.MeetAndGreet].Value   = objBooking.MeetAndGreetCharges.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.CongtionCharge].Value = objBooking.CongtionCharges.ToDecimal();
                    grdLister.Rows[i].Cells[COLS.Total].Value          = objBooking.TotalCharges.ToDecimal();


                    grdLister.Rows[i].Cells[COLS.Passenger].Value = objBooking.CustomerName.ToStr().Trim();
                }
            }


            grdLister.CurrentRow = null;

            txtInvoiceAmount.Text = objMaster.Current.InvoiceTotal.ToDecimal().ToStr();
        }
 private void FillCombo()
 {
     ComboFunctions.FillCompanyCombo(ddlAccount);
 }
        private void frmCashAccountStatementReport_Load(object sender, EventArgs e)
        {
            try
            {
                ComboFunctions.FillCompanyCombo(ddlCompany, c => c.AccountTypeId == Enums.ACCOUNT_TYPE.CASH);
                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       = "Driver";
                col.HeaderText = "Driver";
                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.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.FormatString  = "{0:#,###0.00}";
                grdLister.Columns.Add(colD);


                colD = new GridViewDecimalColumn();
                colD.DecimalPlaces = 2;
                colD.Minimum       = 0;
                colD.HeaderText    = "Congtion";
                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.HeaderText    = "DriverCommission";
                colD.Name          = "DriverCommission";
                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+Parking+Waiting+ExtraDrop+MeetAndGreet+CongtionCharge";
                grdLister.Columns.Add(colD);


                colD = new GridViewDecimalColumn();
                colD.DecimalPlaces = 2;
                colD.Minimum       = 0;
                colD.ReadOnly      = true;
                colD.HeaderText    = "Commission";
                colD.Name          = "Commission";
                colD.Maximum       = 9999999;
                colD.FormatString  = "{0:#,###0.00}";
                //   colD.Expression = "(Total*DriverCommission)/100";

                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["Driver"].Width      = 60;
                grdLister.Columns["PickUpPoint"].Width = 90;
                grdLister.Columns["Destination"].Width = 90;

                grdLister.Columns["Charges"].Width        = 45;
                grdLister.Columns["Parking"].Width        = 45;
                grdLister.Columns["Waiting"].Width        = 50;
                grdLister.Columns["ExtraDrop"].Width      = 55;
                grdLister.Columns["MeetAndGreet"].Width   = 50;
                grdLister.Columns["CongtionCharge"].Width = 55;
                grdLister.Columns["Total"].Width          = 40;
                grdLister.Columns["Commission"].Width     = 55;

                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";

                //grdLister.Columns["MeetAndGreet"].ReadOnly = false;
                //grdLister.Columns["CongtionCharge"].ReadOnly = false;
                //grdLister.Columns["Charge"].ReadOnly = false;
                //grdLister.Columns["Parking"].ReadOnly = false;
                //grdLister.Columns["Waiting"].ReadOnly = false;
                //grdLister.Columns["ExtraDrop"].ReadOnly = false;

                AddUpdateColumn(grdLister);

                grdLister.AllowEditRow = true;
            }
            catch (Exception ex)
            {
            }
        }