コード例 #1
0
        private void button8_Click(object sender, EventArgs e)
        {
            Service1.Service1Client client = new Service1.Service1Client();
            string msg = client.InsertProduct(textBox2.Text, textBox1.Text, richTextBox1.Text);

            label4.Text = msg;
        }
コード例 #2
0
        private void button8_Click(object sender, EventArgs e)
        {
            Service1.Service1Client client = new Service1.Service1Client();
            string name = comboBox1.Text;

            string msg = client.DeleteProduct(name);

            label2.Text = msg;
        }
コード例 #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            this.Hide();
            Home f2 = new Home();

            Service1.Service1Client client = new Service1.Service1Client();
            ProductTable.DataSource = client.ShowProductTable();
            f2.ShowDialog();
        }
コード例 #4
0
        private void button8_Click(object sender, EventArgs e)
        {
            Service1.Service1Client client = new Service1.Service1Client();
            string name  = comboBox1.Text;
            string title = textBox2.Text;
            string type  = textBox1.Text;
            string des   = richTextBox1.Text;
            string msg   = client.UpdateProduct(name, title, type, des);

            label2.Text = msg;
        }
コード例 #5
0
        private void Update_Product_Load(object sender, EventArgs e)
        {
            Service1.Service1Client client = new Service1.Service1Client();
            DataTable dt = client.ShowProductTable();

            foreach (DataRow row in dt.Rows)
            {
                string name = row["Product_title"].ToString();
                comboBox1.Items.Add(name);
            }
        }
コード例 #6
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            label2.Text = "Result?";
            Service1.Service1Client client = new Service1.Service1Client();
            string name = comboBox1.Text;

            DataTable dt = client.GetProduct(name);

            foreach (DataRow row in dt.Rows)
            {
                string Pname = row["Product_title"].ToString();
                string Ptype = row["Product_type"].ToString();
                string Pdes  = row["Product_descripation"].ToString();
                textBox2.Text     = Pname;
                textBox1.Text     = Ptype;
                richTextBox1.Text = Pdes;
            }
        }
コード例 #7
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Service1.Service1Client client = new Service1.Service1Client();
     ProductTable.DataSource = client.ShowProductTable();
 }