Example #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");
            }
        }
Example #2
0
 public Window1()
 {
     InitializeComponent();
     DataContext = new MyTable();
 }