public void reqClient(string parReqCon, string parReqName) { clCust reqClCust = new clCust(); reqClCust.getCust(parReqCon, parReqName); txtCity.Text = reqClCust.ort; txtClientName.Text = reqClCust.name; txtClientContact.Text = reqClCust.contact; txtHousNo.Text = Convert.ToString(reqClCust.Hausnummer); txtZIP.Text = Convert.ToString(reqClCust.PLZ); txtStreet.Text = reqClCust.strasse; }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lbBundeslaender_SelectedIndexChanged(object sender, EventArgs e) { Bundesland bundesland = (Bundesland)lbBundeslaender.SelectedItem; int idBundesland = bundesland.id; chartF1.Series.Clear(); dgvOrders.Rows.Clear(); clCust objCust = new clCust(); dt_last_order = new DateTime(); db_access_connection con = new db_access_connection(); List <Landkreis> landkreise = con.Landkreis(idBundesland); foreach (Landkreis landkreis in landkreise) { lbLandkreis.Items.Add(landkreis.name.ToString()); //lbBundeslaender.Items.Add(bundesland.bezeichnung); } /* * //Resten der Check-Boxen * cbWood.Enabled = false; * cbWood.Checked = false; * cbAzV.Checked = false; * cbAzV.Enabled = false; * cbRestmuell.Enabled = false; * cbRestmuell.Checked = false; * cbSperrmuell.Enabled = false; * cbSperrmuell.Checked = false; * cbPaper.Checked = false; * cbPaper.Enabled = false; * * //Variablendeklaration * //Diese Nummern bekommen die Serien des Charts * series_count = 0; * //series_count_azv = 0; * //series_count_sperrmuell = 0; * //series_count_wood = 0; * amoAmount_sperr = 0; * amoAmount_azv = 0; * amoAmount_wood = 0; * amoAmount_paper = 0; * middle_weight = 0; * int_last_12m_orders = 0; * * * string customer_name = Convert.ToString(lbClients.SelectedItem); * * objCust.getCust(globalConnectionString, customer_name); * * * * lblCustID.Text = "Kundennumer: " + Convert.ToString(objCust.kundennummer); * lblCustName.Text = "Name: " + objCust.name; * lblCustContact.Text = "Ansprechpartner: " + objCust.strasse + " " + Convert.ToString(objCust.Hausnummer) + ", " + Convert.ToString(objCust.PLZ) + " " + objCust.ort; * * clAmount_get f1_clAmountGet = new clAmount_get(); * * List < clAmount > f1_list_clAmountt = new List<clAmount>(); * f1_list_clAmountt = f1_clAmountGet.getAmount(customer_name, globalConnectionString); * * //Abfrage für die letzte Bestellung * try * { * dt_last_order = f1_list_clAmountt[0].amoDate; * } * * catch * { * dt_last_order = DateTime.MinValue; * } * * * * * //Auffüllen der DGV mit den jeweiligen Aufträgen * for (int i = 0; i < f1_list_clAmountt.Count; i++) * { * dgvOrders.Rows.Add(f1_list_clAmountt[i].amoArt, f1_list_clAmountt[i].amoAmount, f1_list_clAmountt[i].amoDate.ToShortDateString()); * * middle_weight += f1_list_clAmountt[i].amoAmount; * * //Abfrage nach der letzten Bestellung * if (f1_list_clAmountt[i].amoDate > dt_last_order) * dt_last_order = f1_list_clAmountt[i].amoDate; * * //Abfrage nach der Anzahl der Bestellungen in den letzten 12 Monaten * if (f1_list_clAmountt[i].amoDate < DateTime.Now) * int_last_12m_orders += 1; * } * * draw_Chart(f1_list_clAmountt); * */ }