public KundeMainView(Kunde kunde, ILinkedItem openThis = null) { InitializeComponent(); this.myKunde = kunde; Model.ModelManager.CustomerService.CurrentCustomer = kunde; var name = this.myKunde.CompanyName1.Replace("&", "&&"); var titel = $"[{this.myKunde.KundenNrCpm}] [{this.myKunde.Vertreter}] {name}"; this.Text = titel; Application.Idle += Application_Idle; ShowStartPanel(); if (openThis != null) { switch (openThis.LinkTypBezeichnung) { case "Kundenkontakt": this.LoadOrShowKontakte(); break; case "Kundenmaschine": var machine = openThis as Kundenmaschine; if (machine != null) { this.ShowMaschine(machine); } break; } } }
/// <summary> /// Erzeugt eine neue Instanz der pnlSoftwareliste Klasse. /// </summary> /// <param name="parentCtrl"></param> /// <param name="kunde"></param> public PanelSoftwareliste(ContainerControl parentCtrl, Model.Entities.Kunde kunde, bool keepLoaded) : base(parentCtrl, keepLoaded) { InitializeComponent(); myParent = parentCtrl as Views.KundeMainView; myKunde = kunde; this.InitializeData(); }
void xcmdMoveToTour_Click(object sender, EventArgs e) { if (this.mySelectedKunde == null) { return; } Model.Entities.Kunde kunde = this.mySelectedKunde; // Neue Tour abfragen Model.Entities.Tour tour = null; var tlv = new TourListenView(ModelManager.SalesForceService.GetTourList(), true); if (tlv.ShowDialog(this) == DialogResult.OK && tlv.SelectedTour != null) { tour = tlv.SelectedTour; } // Aus dieser Tour löschen this.RemoveCustomerFromTour(); // Neuer Tour zuordnen tour.AddKunde(kunde); var msg = string.Format("Ich habe {0} in die Tour {1} verschoben.", kunde.CompanyName1, tour.Tourname); MetroMessageBox.Show(this, msg, "Catalist", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public MachineListView(Model.Entities.Kunde kunde) { InitializeComponent(); this.myKunde = kunde; this.Text = string.Format("{0} - Maschinenliste", kunde.CompanyName1); this.dgvMachines.AutoGenerateColumns = false; this.dgvMachines.DataSource = kunde.Kundenmaschinenliste; }
/// <summary> /// Erstellt eine neuen Instanz der SoftwareView Klasse. /// </summary> public SoftwareView(Model.Entities.Kundensoftware software, Model.Entities.Kunde kunde, Model.Entities.Kundenmaschine maschine = null) { InitializeComponent(); mySoftware = software; myCustomer = kunde; myMachine = maschine; InitializeData(); }
/// <summary> /// Initialisiert eine neue Instanz der EmailView Klasse. /// </summary> public EmailView(MailMessage message, Model.Entities.Kunde kunde) { InitializeComponent(); this.myMessage = message; this.myKunde = kunde; this.InitializeData(); }
void dgvCustomers_RowEnter(object sender, DataGridViewCellEventArgs e) { if (dgvCustomers.Rows[e.RowIndex].DataBoundItem == null || DoNotMove) { return; } CurrentCustomer = dgvCustomers.Rows[e.RowIndex].DataBoundItem as Model.Entities.Kunde; }
/// <summary> /// Erzeugt eine neue Instanz der pnlKontake Klasse. /// </summary> /// <param name="parentCtrl"></param> /// <param name="kunde"></param> public PanelKontakte(ContainerControl parentCtrl, Model.Entities.Kunde kunde, bool keepLoaded) : base(parentCtrl, keepLoaded) { InitializeComponent(); this.myParent = parentCtrl as KundeMainView; this.myKunde = kunde; this.dgvContacts.AutoGenerateColumns = false; this.dgvContacts.DataSource = this.myKunde.Kontaktlist; }
/// <summary> /// Creates a new instance of the CustomerContactsView. /// </summary> /// <param name="parentCustomer"></param> public CustomerContactsView(Model.Entities.Kunde parentCustomer) { InitializeComponent(); this.customer = parentCustomer; this.Text = string.Format("Ansprechpartner bei {0}", parentCustomer.CompanyName1); this.dgvContacts.AutoGenerateColumns = false; this.dgvEmail.AutoGenerateColumns = false; this.dgvContacts.DataSource = parentCustomer.Kontaktliste; //Application.Idle += new EventHandler(Application_Idle); }
public PanelSoftware(ContainerControl parentCtrl, Model.Entities.Kundensoftware software, bool keepLoaded) : base(parentCtrl, keepLoaded) { InitializeComponent(); this.myParent = parentCtrl as Views.KundeMainView; this.mySoftware = software; this.myKunde = software.Kunde; this.InitializeData(); this.OnClosed += pnlSoftware_OnClosed; }
public CustomerOrderView(Model.Entities.Kunde customer, bool reopenSearch) : this() { ThisCustomer = customer; this.lblCustomerName.Text = string.Format(@"{0} ({1})", customer.CompanyName1.Replace("&", "&&"), customer.CustomerId.Substring(0, 5)); this.lblCustomerNameAdd.Text = customer.CompanyName2; this.lblStreet.Text = customer.Street; this.lblZipAndCity.Text = string.Format("{0} {1}", customer.ZipCode, customer.City); Data.DataManager.DataService.GetTabelleOrdersPerKunde(customer.CustomerId); LoadTransactions(); this.txtFilterTransactions.Focus(); }
/// <summary> /// Erzeugt eine neue Instanz der ServicetermineListView Klasse. /// </summary> /// <param name="linkedItem"></param> public ServiceterminListView(object linkedItem) { InitializeComponent(); if (linkedItem.GetType().Equals(typeof(Model.Entities.Kunde))) { myCustomer = linkedItem as Model.Entities.Kunde; } else if (linkedItem.GetType().Equals(typeof(Model.Entities.Kundenmaschine))) { myMachine = linkedItem as Model.Entities.Kundenmaschine; } InitializeData(); }
/// <summary> /// Creates a new instance of the ProductListView class and /// shows the products with prices for the given customer. /// </summary> /// <param name="customer"></param> public ProductListView(Model.Entities.Kunde customer) { InitializeComponent(); this.mtxtCustomer.Clear(); this.myKunde = customer; this.lnkCustomerName.ForeColor = Color.Black; if (customer.CustomerId == "1000100000") { this.lnkCustomerName.Text = "Standard-Preisliste == Cut && Print Media"; } else { this.lnkCustomerName.Text = string.Format("{0} [{1} {2}]", customer.CompanyName1, customer.ZipCode, customer.City); } dgvProducts.AutoGenerateColumns = false; DataView dv = customer.Kundenpreisliste.DefaultView; this.dgvProducts.DataSource = dv; this.txtProductsFilter.Focus(); }
private bool SearchCustomer(string searchFor) { try { this.Cursor = Cursors.WaitCursor; Products.Common.SortableBindingList <Model.Entities.Kunde> list = Model.ModelManager.ModelService.GetCustomersByAny(searchFor); if (list == null || list.Count == 0) { this.txtSuchDenLump.SelectAll(); return(false); } if (list.Count == 1) { Views.CustomerDashboardView cgv = new CustomerDashboardView(list[0]); cgv.Show(); this.txtSuchDenLump.SelectAll(); return(true); } else { CustomerSearchView2 csv = new CustomerSearchView2(list); DialogResult dlgResult = csv.ShowDialog(this); if (dlgResult == System.Windows.Forms.DialogResult.OK && csv.CurrentCustomer != null) { Model.Entities.Kunde customer = csv.CurrentCustomer; Views.CustomerDashboardView cgv = new CustomerDashboardView(customer); cgv.Show(); return(true); } this.txtSuchDenLump.SelectAll(); return(false); } } finally { this.Cursor = Cursors.Default; } }
/// <summary> /// Erstellt eine neue Instanz der SoftwareListView Klasse. /// </summary> public SoftwareListView(Model.Entities.Kunde customer) { InitializeComponent(); myCustomer = customer; Init(); }
/// <summary> /// Legt den Kunden fest. /// </summary> /// <param name="kunde"></param> /// <returns></returns> public CalendarOpenParams SetKunde(Model.Entities.Kunde kunde) { myKunde = kunde; return(this); }
/// <summary> /// Initialisiert eine neue Instanz der ContactListView Klasse. /// </summary> public ContactListView(Model.Entities.Kunde kunde) { InitializeComponent(); this.myKunde = kunde; this.InitializeData(); }
/// <summary> /// Creates a new instance of the CustomerGeneralView class for the given customer. /// </summary> /// <param name="customer"></param> public CustomerDashboardView(Model.Entities.Kunde customer) { InitializeComponent(); this.myCustomer = customer; InitThisView(); }