public ConfigureTruckRoute()
        {
            this.TopLevel = true;

            this.MaximizeBox = false;

            mysql_invoices = new MySQL_Invoices(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
            mysql_drivers = new MySQL_Drivers(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
            mysql_lineitems = new MySQL_LineItems(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
            mysql_routes = new MySQL_Routes(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
            mysql_invoiceroutes = new MySQL_InvoiceRoute(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");

            InitializeComponent();
        }
        public DeliverySchedule()
        {
            InitializeComponent();

               this.MaximizeBox = false;

               mysql_invoices = new MySQL_Invoices(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
               mysql_drivers = new MySQL_Drivers(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
               mysql_lineitems = new MySQL_LineItems(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
               mysql_routes = new MySQL_Routes(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
               mysql_invoiceroutes = new MySQL_InvoiceRoute(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
               viewdate = DateTime.Now;
               scheduleddrivers = new List<DriverInfo>();
               counter = 0;
        }
        public ConfigureAvaiableDrivers()
        {
            this.TopLevel = true;

            this.MaximizeBox = false;

                InitializeComponent();
                truckType.DropDownStyle = ComboBoxStyle.DropDownList;
                toolStripStatusLabel1.Text = "";
                changeddriverflag = false;
                mysql_drivers = new MySQL_Drivers(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
                mysql_routes = new MySQL_Routes(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");

                    drivers = mysql_drivers.GetDrivers();
                    DriverInfo test = mysql_drivers.GetDriverInfo(1);
                    if (drivers == null)
                    {
                        this.Close();
                    }
                    else
                    {
                        driversList.Items.Clear();
                        for (int i = 0; i < drivers.Count; i++)
                        {
                            driversList.Items.Add(drivers[i].name);

                        }
                        driversList.SelectedIndex = 0;

                    }
                    ApplyEdits.Enabled = false;
                    name.TabIndex = 0;
                    hourlyRate.TabIndex = 1;
                    overtimeRate.TabIndex = 2;
                    fuelSurcharge.TabIndex = 3;
                    maitenanceSurcharge.TabIndex = 4;
                    driverNotes.TabIndex = 5;
        }
Пример #4
0
 private void OptimizeWindow_Load(object sender, EventArgs e)
 {
     mysql_invoices = new MySQL_Invoices(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
     mysql_drivers = new MySQL_Drivers(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
     mysql_routes = new MySQL_Routes(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
     mysql_invoiceroutes = new MySQL_InvoiceRoute(GlobalVar.sqlhost, GlobalVar.sqlport, GlobalVar.sqldatabase, GlobalVar.sqlusername, "");
     buttonSave.Enabled = false;
     textDistance.Text = "600";
     textCapacity.Text = "15";
     textRadius.Text = "50";
     textRate.Text = "";
     textOvertime.Text = "";
     textFuel.Text = "";
     textMaitenance.Text = "";
     listDrivers.Items.Clear();
     listRoutes.Items.Clear();
     optimized = false;
     counter = 0;
     radioButton1.Checked = true;
     driverassignments = new List<int>();
     textStatus.Text = "";
     checkBox1.Checked = true;
     DoRefresh();
     toolStripStatusLabel1.Text = "";
 }