コード例 #1
0
        //button sửa loại sản phẩm
        private void button17_Click(object sender, EventArgs e)
        {
            button17.Enabled = false;
            LOAI entity = new LOAI();

            entity.TENLOAI = tenloaitxt.Text;
            entity.MALOAI  = maloailbl.Text;
            loaibus bus    = new loaibus();
            bool    update = bus.update(entity);

            common.successorerror(update);
            if (update)
            {
                loaidgv.DataSource = bus.find(loaidgv.SelectedCells[0].Value.ToString());
                maloailbl.Visible  = false;
                maloaitxt.Visible  = true;
                tenloaitxt.Clear();
            }
            else
            {
            }
        }