예제 #1
0
        public SellProductUI(Shop ashop)
        {
            InitializeComponent();
            this.ashop = ashop;
            ShowSellItemListView();

        }
예제 #2
0
        public SellItem(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;

            ShowProductsOnListView();
        }
예제 #3
0
        public SellItemUI(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;

          
        }
예제 #4
0
        public AddItemUI(Shop aShop)
        {
            InitializeComponent();
            shop=aShop;
            aDatabase = new Database();
           

        }
예제 #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);

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