Attributen werden nun automatisch gesetzt
This commit is contained in:
@@ -189,6 +189,25 @@ namespace SanSystem
|
||||
inspektionsobjekt.Objektbezeichnung = txt_punkt_von.Text;
|
||||
txt_objekt_name.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Objektbezeichnung"));
|
||||
}
|
||||
// Prüfen ob Attribute kommt
|
||||
if(neu)
|
||||
{
|
||||
txt_punkt_bis.DataBindings.Clear();
|
||||
string vonPunkt = txt_punkt_von.Text;
|
||||
StringBuilder attribute = new StringBuilder();
|
||||
for (int i = 0; i < vonPunkt.Length; i++)
|
||||
{
|
||||
if((int)vonPunkt[i] >= 65 && (int)vonPunkt[i] <= 122)
|
||||
{
|
||||
attribute.Append(vonPunkt[i]);
|
||||
}
|
||||
}
|
||||
if(attribute.Length > 0)
|
||||
{
|
||||
inspektionsobjekt.BisPunkt = vonPunkt.Replace(attribute.ToString(), "AP");
|
||||
}
|
||||
txt_punkt_bis.DataBindings.Add(new Binding("Text", inspektionsobjekt, "BisPunkt"));
|
||||
}
|
||||
}
|
||||
|
||||
private void dgv_schadenkuerzel_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
|
||||
|
||||
@@ -45,8 +45,9 @@ namespace SanSystem
|
||||
private void btn_add_Click(object sender, EventArgs e)
|
||||
{
|
||||
KlassenBIB.Inspektionsobjekt inspektionsobjekt = new KlassenBIB.Inspektionsobjekt();
|
||||
inspektionsobjekt.Projektnummer = Global.Instance.ProjektNummer;
|
||||
Datenbank.Instance.loadedProjekt.Objekte.Add(inspektionsobjekt);
|
||||
frmObjektEdit frmObjektEdit = new frmObjektEdit(inspektionsobjekt);
|
||||
frmObjektEdit frmObjektEdit = new frmObjektEdit(inspektionsobjekt,true);
|
||||
frmObjektEdit.MdiParent = this.MdiParent;
|
||||
frmObjektEdit.FormClosed += FrmObjekt_FormClosed;
|
||||
frmObjektEdit.Show();
|
||||
|
||||
Reference in New Issue
Block a user