private void FrmTTSach_Load(object sender, EventArgs e) { var Sach = DALSach.LaySachTheoMa(Masach); textBox1.Text = Sach.Masach; textBox2.Text = DALNXB.LayNXBtheoma(Sach.MaNXB).TenNXB; textBox3.Text = DALTheLoai.LayTheLoaiTheoMa(Sach.MaTheLoai).TenTheLoai; textBox8.Text = Sach.Tensach; textBox4.Text = Sach.Tacgia; textBox5.Text = Sach.GiaBan.ToString(); textBox6.Text = Sach.GiaNhap.ToString(); textBox7.Text = Sach.SoLuong.ToString(); }
private void GVphieuchi_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = GVphieuchi.Rows[e.RowIndex]; txtmaphieuchi.Text = row.Cells[0].Value.ToString(); } var phieuchi = DALPhieuChiNXB.layphieuchitheoma(txtmaphieuchi.Text); dateNgaylap.Text = phieuchi.Ngay.ToString(); txtTongtien.Text = phieuchi.Tongtien.ToString(); cbTrangThai.Text = phieuchi.TrangThai; cbNXB.Text = DALNXB.LayNXBtheoma(phieuchi.MaNXB).TenNXB; }
private void GVNXB_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = GVNXB.Rows[e.RowIndex]; _MaNXB = row.Cells[0].Value.ToString(); } var NXBSelected = DALNXB.LayNXBtheoma(_MaNXB); txtTenNXB.Text = NXBSelected.TenNXB; txtDiaChi.Text = NXBSelected.Diachi; txtSDT.Text = NXBSelected.SDT; txtTienNo.Text = NXBSelected.No.ToString(); txtSoTK.Text = NXBSelected.Sotaikhoan; }
private void GVPN_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = GVPN.Rows[e.RowIndex]; txtMaPN.Text = row.Cells[0].Value.ToString(); } var PnSach = DALPhieuNhap.LayPNtheoma(txtMaPN.Text.Trim()); dateNgaynhap.Text = PnSach.Ngaynhap.ToString(); txtNguoiGiao.Text = PnSach.Nguoigiao; txtTongtien.Text = PnSach.Tongtien.ToString(); cbTinhTrang.Text = PnSach.TinhTrang; CbNXB.Text = DALNXB.LayNXBtheoma(PnSach.MaNXB).TenNXB; }
private void GVSach_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = GVSach.Rows[e.RowIndex]; masach = row.Cells[0].Value.ToString(); } var Sach = DALSach.LaySachTheoMa(masach); txtTensach.Text = Sach.Tensach; txtTacGia.Text = Sach.Tacgia; txtGia.Text = Sach.GiaBan.ToString(); txtSoLuong.Text = Sach.SoLuong.ToString(); cbTenNXB.Text = DALNXB.LayNXBtheoma(Sach.MaNXB).TenNXB; cbTenTheLoai.Text = DALTheLoai.LayTheLoaiTheoMa(Sach.MaTheLoai).TenTheLoai; txtgianhap.Text = Sach.GiaNhap.ToString(); }