Example #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            TaiLieu tl = new TaiLieu();

            panel3.Visible        = true;
            panel1.Width          = 803;
            panel1.Height         = 659;
            pictureBox1.Image     = null;
            pictureBox2.Image     = null;
            txtNgayNhap.Text      = (DateTime.Now).ToString();
            cbbMaChiTiet.Enabled  = false;
            cbbMaChiTiet.Text     = (int.Parse(tl.taoMaTuDong()) + 1).ToString();
            cbbMaTaiLieu.Enabled  = false;
            cbbMaTaiLieu.Text     = matailieu;
            cbbNhaCC.Enabled      = true;
            cbbNhaXB.Enabled      = true;
            cbbSoLuong.Enabled    = true;
            cbbTacGia.Enabled     = true;
            cbbTenChiTiet.Enabled = true;
            cbbViTri.Enabled      = true;
            txtGiaBia.Enabled     = true;
            txtGiaNhap.Enabled    = true;
            txtLink.Enabled       = true;
            txtNguoiNhap.Enabled  = true;
            txtSoTrang.Enabled    = true;
            // xoa trang
            cbbNhaCC.Text      = "";
            cbbNhaXB.Text      = "";
            cbbSoLuong.Text    = "";
            cbbTacGia.Text     = "";
            cbbTenChiTiet.Text = "";
            cbbViTri.Text      = "";
            txtGiaBia.Text     = "";
            txtGiaNhap.Text    = "";
            txtLink.Text       = "";
            txtNguoiNhap.Text  = "";
            txtSoTrang.Text    = "";
            cbbTenChiTiet.Focus();
            themhaysua = "them";
        }