Exemplo n.º 1
0
        public SellProductUI(Shop ashop)
        {
            InitializeComponent();
            this.ashop = ashop;
            ShowSellItemListView();

        }
Exemplo n.º 2
0
        public SellItem(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;

            ShowProductsOnListView();
        }
Exemplo n.º 3
0
        public SellItemUI(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;

          
        }
Exemplo n.º 4
0
        public AddItemUI(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;
            aDatabase = new Database();
           

        }
Exemplo n.º 5
0
        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);

        }
Exemplo n.º 6
0
 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 = "";
 }
Exemplo n.º 7
0
 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";
 }
Exemplo n.º 8
0
 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 = "";
 }
Exemplo n.º 9
0
 public SellItemUI(Shop aShop)
 {
     InitializeComponent();
     this.aShop = aShop;
     SellItemInListView();
 }
Exemplo n.º 10
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     aShopProduct = new Shop(nameTextBox.Text, addressTextBox.Text);
     MessageBox.Show("saved Shop Info");
 }
Exemplo n.º 11
0
 public AddItemUI(Shop aShop)
 {
     InitializeComponent();
     this.aShop = aShop;
    // ShowItemInListView();
 }