Exemple #1
0
        private async void add_Click(object sender, RoutedEventArgs e)
        {
            string tableCommand;
            string name = teamName.Text;
            string type = teamType.Text;

            if (name == "" || type == "")
            {
                return;
            }
            await Tdl.Insertteams(name, type, pd.emp.id, pd.emp.name);

            team.Add(new Team {
                name = name, type = type, manager = pd.emp.name
            });
            Addteam.Hide();
        }
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            string tableCommand;
            string name = teamName.Text;
            string type = teamType.Text;

            if (name == "" || type == "")
            {
                return;
            }
            tableCommand = "SELECT * FROM teams WHERE name='" + name + "';";
            bool result = await DataBase.verify(tableCommand);

            if (result == false)
            {
                tableCommand = "INSERT INTO teams(name,type,empid,empname)" +
                               "VALUES('" + name + "','" + type + "','" + emp.id + "','" + emp.name + "');";
                result = await DataBase.ExecuteCommand(tableCommand);

                Addteam.Hide();
            }
        }
Exemple #3
0
 private async void add_team_Click(object sender, RoutedEventArgs e)
 {
     await Addteam.ShowAsync();
 }
Exemple #4
0
 private void close_Click(object sender, RoutedEventArgs e)
 {
     Addteam.Hide();
 }