Example #1
0
 partial void DeleteAS400Geräte(AS400Geräte instance);
Example #2
0
 partial void InsertAS400Geräte(AS400Geräte instance);
Example #3
0
 partial void UpdateAS400Geräte(AS400Geräte instance);
Example #4
0
        protected void Button_AS400_Speichern_Click(object sender, EventArgs e)
        {
            if (neu_asg)
            {

                AS400Geräte asg = new AS400Geräte() { Kennung = TextBox_AS400_Kennung.Text };
                AS400Geräte.db.AS400Geräte.InsertOnSubmit(asg);

                try
                {
                    AS400Geräte.db.SubmitChanges();
                }
                catch (Exception)
                {

                }

                AS400Adressen asa = new AS400Adressen() {  Id_Adressen = Convert.ToInt32(Session["IPid"]), Id_AS400Geräte = AS400Geräte.GetIdByKennung(TextBox_AS400_Kennung.Text) };
                AS400Adressen.db.AS400Adressen.InsertOnSubmit(asa);

                try
                {
                    AS400Adressen.db.SubmitChanges();
                }
                catch (Exception)
                {

                }
            }
            else
            {
                AS400Geräte asg = AS400Geräte.GetAS400GeräteById(Convert.ToInt32( GridView_AS400_Verwalten.Rows[GridView_AS400_Verwalten.SelectedIndex].Cells[0].Text));
                asg.Kennung = TextBox_AS400_Kennung.Text;
                //...
            }
            try
            {
                AS400Geräte.db.SubmitChanges();
            }
            catch (Exception)
            {

            }

            TextBox_AS400_Kennung.Text = String.Empty;
            TextBox_AS400_Kennung.Enabled = false;

            GridView_AS400_Verwalten_Refresh();
        }