public UpdateModel updateTester(string id, UpdateModel um)
 {
     using (EventrixDBDataContext db = new EventrixDBDataContext())
     {
         var query = (from acc in db.UpdateTesters where acc.TesterID.Equals(Convert.ToInt32(id)) select acc);
         if (query.Count() == 1)
         {
             UpdateTester acc = query.Single();
             // acc.TesterID = um.ID;
             acc.Name    = um.Name;
             acc.Surname = um.Surname;
             db.SubmitChanges();
             um = new UpdateModel()
             {
                 ID      = acc.TesterID,
                 Name    = acc.Name,
                 Surname = acc.Surname,
             };
             // return accommo;
             // string accName = um.Name;
             return(um);
         }
         else
         {
             return(null);
         }
     }
 }
Beispiel #2
0
        private void UpdateTesterButton(object sender, RoutedEventArgs e)
        {
            UpdateTester updateTester = new UpdateTester();

            updateTester.Show();
        }