public SellProductUI(Shop ashop) { InitializeComponent(); this.ashop = ashop; ShowSellItemListView(); }
public SellItem(Shop aShop) { InitializeComponent(); shop=aShop; ShowProductsOnListView(); }
public SellItemUI(Shop aShop) { InitializeComponent(); shop=aShop; }
public AddItemUI(Shop aShop) { InitializeComponent(); shop=aShop; aDatabase = new Database(); }
private void saveButton_Click(object sender, EventArgs e) { string name = nameTextBox.Text; string address = addressTextBox.Text; aShop = new Shop(name,address); string msg = aDatabase.AddShopInDatabase(name,address); MessageBox.Show(msg); }
private void saveButton_Click(object sender, EventArgs e) { aShop = new Shop(nameTextBox.Text, addressTextBox.Text); DatabaseGateway aDatabaseGateway = new DatabaseGateway(); string msg = aDatabaseGateway.SaveShop(aShop); MessageBox.Show(msg); nameTextBox.Text = ""; addressTextBox.Text = ""; }
public string SaveShop(Shop aShop) { conn = new SqlConnection(connectionString); conn.Open(); string query = "INSERT INTO t_Shop(Name, Address) values('" + aShop.ShopName + "','" + aShop.ShopAddress + "')"; sqlCommand = new SqlCommand(query, conn); sqlCommand.ExecuteNonQuery(); conn.Close(); return "Shop information has been saved"; }
private void saveButton_Click(object sender, EventArgs e) { aShop = new Shop(nameTextBox.Text, addressTextBox.Text); string connectionString = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=E:\FTFL-ITS-2014000122\SuperShopWithAddAndSellApp\SuperShopWithAddAndSellApp\SuperShop.mdf"; SqlConnection conn = new SqlConnection(connectionString); conn.Open(); string query = "INSERT INTO Shop_table(Name, Address) values('" + aShop.ShopName + "','" + aShop.ShopAddress + "')"; SqlCommand insert = new SqlCommand(query, conn); insert.ExecuteNonQuery(); conn.Close(); nameTextBox.Text = ""; addressTextBox.Text = ""; }
public SellItemUI(Shop aShop) { InitializeComponent(); this.aShop = aShop; SellItemInListView(); }
private void saveButton_Click(object sender, EventArgs e) { aShopProduct = new Shop(nameTextBox.Text, addressTextBox.Text); MessageBox.Show("saved Shop Info"); }
public AddItemUI(Shop aShop) { InitializeComponent(); this.aShop = aShop; // ShowItemInListView(); }