Exemple #1
0
        public static void AddItemExt(MyTable table)
        {
            int i = table.Num + 1;

            if (table.Num < 5)
            {
                string tsql = @"UPDATE [Customers] SET num_ext='" + i + "' WHERE Id='" + table.Id + "'";
                try
                {
                    DBCon con = new DBCon();
                    con.AddExt(tsql);
                    MessageBox.Show("update");
                }
                catch (SqlException ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
            else
            {
                MessageBox.Show("Already use all ext");
            }
        }
Exemple #2
0
        public AdminViewModel()
        {
            DBCon con = new DBCon();

            Users = con.Users();
        }