528 lines
20 KiB
C#
528 lines
20 KiB
C#
using DatenDB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Web.Caching;
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms.VisualStyles;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
|
|
namespace Deckungsbeitrag
|
|
{
|
|
public partial class FormNeuerAuftrag : Form
|
|
{
|
|
#region Properties
|
|
public Meldungen meldung = new Meldungen();
|
|
public Kunde kunde;
|
|
public Auftrag Auftrag;
|
|
public Auftrag extraAuftrag;
|
|
public Fach fach;
|
|
public AuftragArtikel AuftragArtikel;
|
|
private Benutzer benutzer;
|
|
private Maschine maschine;
|
|
bool extra;
|
|
List<Sortiment> sortimentListe;
|
|
public DateTime? letzterLiefertag;
|
|
private Kunde knd;
|
|
public DataGridViewCell aktivCell;
|
|
private string userid;
|
|
private AuftragTyp auftragtyp = AuftragTyp.Standart;
|
|
#endregion
|
|
|
|
#region Form-Konstruktor
|
|
public FormNeuerAuftrag()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
public FormNeuerAuftrag(Benutzer benutzer) : this()
|
|
{
|
|
this.benutzer = benutzer;
|
|
|
|
}
|
|
public FormNeuerAuftrag(Benutzer benutzer, AuftragTyp auftragTyp) : this(benutzer)
|
|
{
|
|
this.auftragtyp = auftragTyp;
|
|
}
|
|
public FormNeuerAuftrag(Benutzer benutzer, DateTime? letzterLiefertag, AuftragTyp auftragTyp) : this(benutzer, auftragTyp)
|
|
{
|
|
this.letzterLiefertag = letzterLiefertag;
|
|
}
|
|
public FormNeuerAuftrag(string userid) : this()
|
|
{
|
|
this.userid = userid;
|
|
if (userid.Contains("wstrasse01")) this.benutzer = Benutzer.GetBenutzer("ws1", null);
|
|
if (userid.Contains("wstrasse02")) this.benutzer = Benutzer.GetBenutzer("ws2", null);
|
|
}
|
|
#endregion
|
|
private void FormNeuerAuftrag_Load(object sender, EventArgs e)
|
|
{
|
|
// SortimentListe holen
|
|
sortimentListe = Funktionen.SortimentLesen("Liste");
|
|
|
|
// Kunde holen
|
|
this.kunde = Funktionen.KundenAuswahl();
|
|
|
|
// ComboBox AuftragTyp wird geladen und richtiges Item selected.
|
|
comboBox_Load();
|
|
|
|
// Falls KundenAuswahl null liefert wird Form geschlossen oder wenn Waschstrasse neu geladen.
|
|
if (this.kunde != null) DatenLaden();
|
|
else
|
|
{
|
|
// Wenn NICHT Waschstrasse dann Fenster schließen.
|
|
//if (this.userid.Contains("wstrasse")) FormNeuerAuftrag_Load(this, e);
|
|
//else this.Close();
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
|
|
this.dGArtikel.ForeColor = Color.Black;
|
|
this.dTPLiefertag.Value = DateTime.Today.AddDays(1);
|
|
this.textBoxKundeName.Enabled = false;
|
|
this.textBoxKndNr.Enabled = false;
|
|
|
|
// RadioButtons und ComboBoxen laden.
|
|
if(this.kunde != null) Funktionen.Get_RadioButtons(this);
|
|
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// Kundendaten Liefertag werden eingefügt.
|
|
/// </summary>
|
|
private void DatenLaden()
|
|
{
|
|
this.textBoxKndNr.Text = kunde.KundeNummer;
|
|
if (string.IsNullOrWhiteSpace(kunde.Suchtext)) this.textBoxKundeName.Text = kunde.KundeName;
|
|
else this.textBoxKundeName.Text = kunde.Suchtext;
|
|
if (letzterLiefertag.HasValue) this.dTPLiefertag.Value = letzterLiefertag.Value;
|
|
else this.dTPLiefertag.Value = DateTime.Today.AddDays(1);
|
|
|
|
dTPLiefertag_Leave(this.dTPLiefertag, EventArgs.Empty);
|
|
textBoxCont_TextChanged(this.textBoxCont, EventArgs.Empty);
|
|
}
|
|
private void comboBox_Load()
|
|
{
|
|
// Items werden von AuftragTyp geladen.
|
|
this.comboBoxTyp.DataSource = Enum.GetValues(typeof(AuftragTyp));
|
|
|
|
//TODO: Wenn kunde null dann return.
|
|
// Wenn der Kunde ein Geschäftskunde ist, wird AuftragTyp.Geschäft ausgewählt. Andernfalls wird der AuftragTyp aus dem Konstruktor gewählt.
|
|
if (kunde.Service == "Geschäft") this.comboBoxTyp.SelectedItem = AuftragTyp.Geschäft;
|
|
else this.comboBoxTyp.SelectedItem = auftragtyp;
|
|
|
|
this.comboBoxTyp.Enabled = false;
|
|
}
|
|
private void Load_Gridview(string kundeid, AuftragTyp auftragTyp)
|
|
{
|
|
|
|
List<KundeArtikel> artikelListe = KundeArtikel.GetList(kundeid);
|
|
|
|
//List<Sortiment> resultList = null;
|
|
//resultList = sortimentListe.FindAll(Sortiment => Sortiment.KundeNummer == kundeNr);
|
|
|
|
if (artikelListe.Count != 0)
|
|
{
|
|
this.dGArtikel.AutoGenerateColumns = false;
|
|
foreach (DataGridViewColumn col in this.dGArtikel.Columns)
|
|
{
|
|
col.DataPropertyName = col.Name;
|
|
|
|
if (col.Name.Contains("Bearbeitet")) col.Visible = false;
|
|
if (col.Name == "Fehlmenge")
|
|
{
|
|
if (auftragTyp == AuftragTyp.Inventur) col.Visible = true;
|
|
else col.Visible = false;
|
|
}
|
|
if (col.Name == "Korrektur")
|
|
{
|
|
if(auftragTyp >= AuftragTyp.Standerhöhung) col.Visible = true;
|
|
else col.Visible = false;
|
|
}
|
|
}
|
|
|
|
|
|
// DataGridView mit ArtikelStand Liste verbinden und Columns automatisch generieren.
|
|
this.dGArtikel.DataSource = artikelListe;
|
|
|
|
this.dGArtikel.ClearSelection();
|
|
//this.dGArtikel.CurrentCell = this.dGArtikel.Rows[0].Cells[3];
|
|
|
|
// Alle Spaltenbreiten an den Zellinhalt anpassen
|
|
this.dGArtikel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
|
this.dGArtikel.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
|
|
// Alle Zeilenhöhen an Zellinhalt anpassen
|
|
this.dGArtikel.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
|
|
this.dGArtikel.AutoResizeRows(DataGridViewAutoSizeRowsMode.AllCells);
|
|
|
|
int totalWidth = dGArtikel.RowHeadersVisible ? dGArtikel.RowHeadersWidth : 0;
|
|
foreach (DataGridViewColumn col in dGArtikel.Columns)
|
|
{
|
|
if (col.Visible) totalWidth += col.Width;
|
|
}
|
|
|
|
int totalHeight = dGArtikel.ColumnHeadersVisible ? dGArtikel.ColumnHeadersHeight : 0;
|
|
foreach (DataGridViewRow row in dGArtikel.Rows)
|
|
{
|
|
if (row.Visible) totalHeight += row.Height;
|
|
}
|
|
totalHeight += dGArtikel.ColumnHeadersHeight;
|
|
|
|
dGArtikel.ClientSize = new Size(totalWidth, totalHeight);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Button Click Events.
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void buttonAbbrechen_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
private void buttonSpeichern_Click(object sender, EventArgs e)
|
|
{
|
|
int[] save;
|
|
if(kunde == null)
|
|
{
|
|
MessageBox.Show("Auftrag kann nicht gespeichert werden. Kein Kunde vorhanden.", "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
|
this.textBoxKndNr.Focus();
|
|
return;
|
|
}
|
|
else Auftrag = new Auftrag();
|
|
|
|
//AUFTRAG DATEN ÜBERGEBEN
|
|
Auftrag.KundeID = (int)kunde.KundeID;
|
|
|
|
//TODO: Überlegen ob das der richtige Weg ist. Eventuell in Expedit sowohl KundeAufgabe wie auch AuftragAufgabe anzeigen? NOTWENDIG?
|
|
if (Auftrag.AufgabeID == null) { if (kunde.Aufgabe != null) Auftrag.AufgabeID = kunde.Aufgabe; }
|
|
Auftrag.Liefertag = this.dTPLiefertag.Value;
|
|
Auftrag.Container = int.Parse(this.textBoxCont.Text);
|
|
Auftrag.ErstelltVon = (int)this.benutzer.BenutzerID;
|
|
Auftrag.Erstellt = DateTime.Now;
|
|
Auftrag.Container = int.Parse(this.textBoxCont.Text);
|
|
Auftrag.Typ = (AuftragTyp)comboBoxTyp.SelectedItem;
|
|
if (maschine != null) Auftrag.MaschineID = (int)maschine.MaschineID;
|
|
else Auftrag.MaschineID = null;
|
|
|
|
if(Auftrag.FindeAuftrag(Auftrag) == true)
|
|
{
|
|
if (meldung.AuftragVorhanden(Auftrag) == DialogResult.Yes)
|
|
{
|
|
|
|
if (benutzer.Rolle == BenutzerRolle.Verwaltung || benutzer.Rolle == BenutzerRolle.Admin) Auftrag.Status = AuftragStatus.Herrichten;
|
|
else Auftrag.Status = AuftragStatus.Aufgelegt;
|
|
|
|
//Wenn SONDERAUFTRAG(STH,STV,STA) dann ARTIKEL speichern.
|
|
if (Auftrag.Typ >= AuftragTyp.Inventur)
|
|
{
|
|
int tosave = 0;
|
|
int saved = 0;
|
|
foreach (DataGridViewRow artikel in this.dGArtikel.Rows)
|
|
{
|
|
tosave++;
|
|
KundeArtikel stand;
|
|
if (artikel.Cells[0].Value != null)
|
|
{
|
|
stand = KundeArtikel.GetItem(int.Parse(artikel.Cells[0].Value.ToString()));
|
|
if (artikel.Cells[5].Visible == true)
|
|
{
|
|
stand.Fehlmenge = int.Parse(artikel.Cells[5].Value.ToString());
|
|
stand.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
|
|
}
|
|
if (artikel.Cells[6].Visible == true)
|
|
{
|
|
stand.Korrektur = int.Parse(artikel.Cells[6].Value.ToString());
|
|
stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
|
|
}
|
|
if (stand.Save() == 1) saved++;
|
|
}
|
|
}
|
|
//Kontrolle ob alle Artikel gespeichert wurden.
|
|
if (saved != tosave) meldung.Speicherfehler();
|
|
else
|
|
{
|
|
//Speichern von AUFTRAG
|
|
save = Auftrag.Save();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!extra)
|
|
{
|
|
if (Auftrag.Save()[1] == 1) this.Close();
|
|
}
|
|
else save = Auftrag.Save();
|
|
}
|
|
}
|
|
else { Auftrag = new Auftrag(); FormNeuerAuftrag_Load(this, e); return; }
|
|
}
|
|
else
|
|
{
|
|
switch (benutzer.Rolle)
|
|
{
|
|
case BenutzerRolle.Verwaltung:
|
|
Auftrag.Status = AuftragStatus.Herrichten;
|
|
break;
|
|
case BenutzerRolle.Fahrer:
|
|
Auftrag.Status = AuftragStatus.Abgeholt;
|
|
break;
|
|
case BenutzerRolle.Admin:
|
|
Auftrag.Status = AuftragStatus.Herrichten;
|
|
break;
|
|
case BenutzerRolle.Waschstrasse:
|
|
Auftrag.Status = AuftragStatus.Aufgelegt;
|
|
break;
|
|
case BenutzerRolle.Master:
|
|
break;
|
|
case BenutzerRolle.Expedit:
|
|
Auftrag.Status = AuftragStatus.Herrichten;
|
|
break;
|
|
case BenutzerRolle.Frottee:
|
|
break;
|
|
case BenutzerRolle.Flach:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
//Wenn SONDERAUFTRAG(STH,STV,STA) dann ARTIKEL speichern.
|
|
if (Auftrag.Typ >= AuftragTyp.Inventur)
|
|
{
|
|
int tosave = 0;
|
|
int saved = 0;
|
|
bool negieren = false;
|
|
foreach (DataGridViewRow artikel in this.dGArtikel.Rows)
|
|
{
|
|
tosave++;
|
|
KundeArtikel stand;
|
|
if (artikel.Cells[0].Value != null)
|
|
{
|
|
stand = KundeArtikel.GetItem(int.Parse(artikel.Cells[0].Value.ToString()));
|
|
if (artikel.Cells[5].Visible == true)
|
|
{
|
|
stand.Fehlmenge = int.Parse(artikel.Cells[5].Value.ToString());
|
|
stand.FehlmengeBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
|
|
}
|
|
if (artikel.Cells[6].Visible == true)
|
|
{
|
|
if (int.TryParse(artikel.Cells[6].Value.ToString(), out int result))
|
|
{
|
|
if (Auftrag.Typ == AuftragTyp.Standverminderung) negieren = true;
|
|
stand.Korrektur = (negieren && stand.Korrektur > 0) ? -result : result;
|
|
stand.KorrekturBearbeitet = this.benutzer.BenutzerName + " am " + DateTime.Now.ToString();
|
|
}
|
|
else { meldung.Eingabefehler(); return; }
|
|
}
|
|
if (stand.Save() == 1) saved++;
|
|
}
|
|
}
|
|
//Kontrolle ob alle Artikel gespeichert wurden.
|
|
if (saved != tosave) meldung.Speicherfehler();
|
|
else
|
|
{
|
|
//Speichern von AUFTRAG
|
|
save = Auftrag.Save();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!extra)
|
|
{
|
|
//this.fach.KundeID = Auftrag.KundeID;
|
|
//this.fach.Lieferdatum = Auftrag.Liefertag;
|
|
//this.fach.Liefertag = (Liefertag)Auftrag.Liefertag.DayOfWeek;
|
|
//if (extraAuftrag == null) { this.fach.ExtraAuftragID = null; this.fach.ExtraKundeID = null; }
|
|
//else { this.fach.ExtraAuftragID = extraAuftrag.AuftragID; this.fach.ExtraKundeID = extraAuftrag.KundeID; }
|
|
//this.fach.Gewaschen = (DateTime)Auftrag.Erstellt;
|
|
|
|
//FormFachBearbeiten fachbearb = new FormFachBearbeiten(this.Auftrag ,this.fach);
|
|
//if (fachbearb.ShowDialog() == DialogResult.OK)
|
|
//{
|
|
// this.fach = fachbearb.fach;
|
|
// //Speichern von AUFTRAG
|
|
// save = Auftrag.Save();
|
|
//}
|
|
//this.fach.AuftragID = Auftrag.AuftragID;
|
|
if (Auftrag.Save()[1] == 1) this.Close();
|
|
|
|
}
|
|
else save = Auftrag.Save();
|
|
}
|
|
}
|
|
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
|
|
}
|
|
private void Container_Click(object sender, EventArgs e)
|
|
{
|
|
PictureBox pb = (PictureBox)sender;
|
|
int cont = int.Parse(this.textBoxCont.Text);
|
|
if (pb.Name.ToString().Contains("Plus")) cont++;
|
|
if (pb.Name.ToString().Contains("Minus")) cont--;
|
|
this.textBoxCont.Text = cont.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// TextBox Events
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void textBoxCont_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (this.textBoxCont.Text == "0") { this.pictureBoxMinus.Enabled = false; this.pictureBoxMinus.BackColor = Color.Gray; }
|
|
else { this.pictureBoxMinus.Enabled = true; this.pictureBoxMinus.BackColor = Color.Red; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Liefertag mit automatischer Berechnung des nächsten Datums bzw. des Wochentages des Datums.
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void dTPLiefertag_Leave(object sender, EventArgs e)
|
|
{
|
|
foreach (RadioButton liefertag in this.Controls.OfType<RadioButton>())
|
|
{
|
|
if (liefertag.Name.Contains(((Liefertag)dTPLiefertag.Value.DayOfWeek).ToString())) liefertag.Checked = true;
|
|
}
|
|
}
|
|
private void Liefertag_rB_Checked(object sender, EventArgs e)
|
|
{
|
|
foreach (RadioButton radioButton in this.Controls.OfType<RadioButton>())
|
|
{
|
|
if (radioButton.Checked) radioButton.BackColor = Color.Yellow;
|
|
else { radioButton.BackColor = Color.Gray; }
|
|
}
|
|
}
|
|
private void Liefertag_rB_Click(object sender, EventArgs e)
|
|
{
|
|
RadioButton radioButton = (RadioButton)sender;
|
|
foreach(Liefertag tag in Enum.GetValues(typeof(Liefertag)))
|
|
{
|
|
if (radioButton.Name.Contains(tag.ToString())) this.dTPLiefertag.Value = Berechnungen.GetNextWeekday((int)tag);
|
|
}
|
|
this.dTPLiefertag.Enabled = false;
|
|
}
|
|
private void dTPLiefertag_ValueChanged(object sender, EventArgs e)
|
|
{
|
|
dTPLiefertag_Leave(sender, e);
|
|
}
|
|
|
|
private void textBoxKndNr_Click(object sender, EventArgs e)
|
|
{
|
|
this.textBoxKndNr.Clear();
|
|
//Process.Start("C:\\Windows\\WinSxS\\amd64_microsoft-windows-osk_31bf3856ad364e35_10.0.22621.3672_none_8a93c823d58f9d77\\osk.exe");
|
|
}
|
|
|
|
//Wenn der Kunde nicht gefunden wird und händisch eingegeben wird, wird beim verlassen der Textbox der Kunde als DIV ZIELKUNDE erstellt.
|
|
//Der individuelle Kundename wird als KUNDE.SUCHTEXT eingetragen aber nicht gespeichert.
|
|
private void textBoxKundeName_Leave(object sender, EventArgs e)
|
|
{
|
|
if (!string.IsNullOrWhiteSpace(textBoxKundeName.Text))
|
|
{
|
|
kunde = Kunde.GetKunde("2300000", null, null);
|
|
kunde.Suchtext = this.textBoxKundeName.Text;
|
|
}
|
|
}
|
|
|
|
//Wenn mit TAB aus Textbox gesprungen wird, wird Focus auf TEXTBOX KUNDENAME gelegt. (Dadurch wird Fehlermeldung aktiviert)
|
|
private void textBoxKndNr_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
|
{
|
|
if (e.KeyValue == 9) textBoxKundeName.Focus();
|
|
}
|
|
|
|
private void DataGridView_CellEnter(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Überprüfen ob die Eingabe eine Zahl ist. Es wird sonst eine Meldung angezeigt und das weiterspringen wird verhindert.
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void dGArtikel_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
|
|
{
|
|
if (e.ColumnIndex >= 5)
|
|
{
|
|
DataGridView dgv = (DataGridView)sender;
|
|
DataGridViewCell dgc = dgv.CurrentCell;
|
|
if (!int.TryParse(dgc.EditedFormattedValue.ToString(), out int i))
|
|
{
|
|
meldung.Eingabefehler();
|
|
e.Cancel = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void comboBoxTyp_SelectedValueChanged(object sender, EventArgs e)
|
|
{
|
|
switch ((AuftragTyp)comboBoxTyp.SelectedValue)
|
|
{
|
|
case AuftragTyp.Geschäft: // Wird derzeit wenig verwendet da die Auswahl in DatenLaden nach KundenService erfolgt.
|
|
this.dGArtikel.Enabled = this.dGArtikel.Visible = false;
|
|
this.Width = textBoxKundeName.Right + 30;
|
|
this.Height = 405;
|
|
break;
|
|
case AuftragTyp.Standart:
|
|
this.dGArtikel.Enabled = this.dGArtikel.Visible = false;
|
|
this.Width = textBoxKundeName.Right + 30;
|
|
this.Height = 405;
|
|
break;
|
|
case AuftragTyp.Inventur:
|
|
if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
|
|
this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
|
|
this.Width = this.dGArtikel.Right + 25;
|
|
this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
|
|
break;
|
|
case AuftragTyp.Standerhöhung:
|
|
if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
|
|
this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
|
|
this.Width = this.dGArtikel.Right + 25;
|
|
this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
|
|
break;
|
|
case AuftragTyp.Standverminderung:
|
|
if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
|
|
this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
|
|
this.Width = this.dGArtikel.Right + 25;
|
|
this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
//if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Inventur)
|
|
//{
|
|
// if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
|
|
// this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
|
|
// this.Width = this.dGArtikel.Right + 25;
|
|
// this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
|
|
//}
|
|
//if ((AuftragTyp)comboBoxTyp.SelectedValue >= AuftragTyp.Standerhöhung)
|
|
//{
|
|
// if (this.kunde != null) Load_Gridview(this.kunde.KundeID.ToString(), (AuftragTyp)comboBoxTyp.SelectedValue);
|
|
// this.dGArtikel.Enabled = this.dGArtikel.Visible = true;
|
|
// this.Width = this.dGArtikel.Right + 25;
|
|
// this.Height = this.dGArtikel.Bottom + this.buttonSpeichern.Height + 60;
|
|
//}
|
|
//if ((AuftragTyp)comboBoxTyp.SelectedValue == AuftragTyp.Standart)
|
|
//{
|
|
// this.dGArtikel.Enabled = this.dGArtikel.Visible = false;
|
|
// this.Width = textBoxKundeName.Right + 30;
|
|
// this.Height = 405;
|
|
//}
|
|
}
|
|
}
|
|
}
|
|
//CHANGES: NeuerAuftrag wird jetzt mit Propertie AuftragTyp aufgerufen. Dadurch ist die Auswahl des AuftragTyp konstanter. |