Beispiel #1
0
        private void display()
        {
            Itembll items = new Itembll();

            dgview.DataSource = items.select();

            /* string query;
             * // query= "select item_no,item_name,rate from item order by item_no desc";
             *
             * // DataTable dt = conn.retrieve(query);
             * dgview.DataSource = dt;*/
        }
Beispiel #2
0
        private void btnsave_Click(object sender, EventArgs e)
        {
            Itembll insert = new Itembll();

            insert.iid = itemid;
            insert.i   = (txtitemname.Text);
            insert.r   = (float.Parse(txtrate.Text));
            if (btnsave.Text == "Save")
            {
                insert.insertdata();
            }

            else
            {
                insert.updatedata();
            }
            btnsave.Text = "Save";

            //  MessageBox.Show("inserted!!");
            display();
        }