//pattern factory method private void Button_to_group(object sender, RoutedEventArgs e) { Groupa groupa = new Groupa(); var g = groupa.CreateNew(first.Text, second.Text, third.Text, four.Text); g.AddToDataBase(); }
public override Table CreateNew(String first, String second, String third, String four) { Groupa g = new Groupa(); g.group = new group(); g.group.id_gr = Convert.ToInt32(first); g.group.group_name = second; g.group.st_counts = Convert.ToInt32(third); g.group.id_fl = Convert.ToInt32(four); return(g); }