//lấy danh sách tồn kho
        private void button16_Click(object sender, EventArgs e)
        {
            tonkhobus bus = new tonkhobus();

            danhsachtonkho1dgv.DataSource         = bus.list();
            danhsachtonkho1dgv.Columns[8].Visible = false;
        }
        //lấy dữ liệu tồn kho
        private void button4_Click(object sender, EventArgs e)
        {
            tonkhobus bus = new tonkhobus();

            thongtindonnhapdgv.DataSource       = bus.list();
            thongtindonnhapdgv.Columns[0].Width = 144;
        }
Example #3
0
        //xóa (sửa chi tiết phiếu)
        private void xoachitietphieu(object sender, EventArgs args)
        {
            TONKHO    entity = new TONKHO();
            tonkhobus bus    = new tonkhobus();

            entity.STT = Int32.Parse(thongtindonnhap1dgv.SelectedCells[0].Value.ToString());
            bool delete = bus.delete(entity);

            common.successorerror(delete);
            if (delete)
            {
                thongtindonnhap1dgv.DataSource = bus.list();
            }
            else
            {
            }
        }