Exemplo n.º 1
0
 private void HangHoa_Load(object sender, EventArgs e)
 {
     dtgHangHoa.DataSource = hanghoaBUS.GetData();
     Stt();
     dtgHangHoa.BackgroundColor           = Color.Red;
     dtgHangHoa.ForeColor                 = Color.Green;
     dtgHangHoa.Columns[1].Width          = 0;
     dtgHangHoa.Columns[0].Width          = 40;
     dtgHangHoa.Columns[6].Width          = 75;
     dtgHangHoa.Columns[2].Width          = 150;
     dtgHangHoa.Columns[4].Width          = 120;
     dtgHangHoa.Columns[5].Width          = 120;
     dtgHangHoa.Columns[7].Width          = 150;
     dtgHangHoa.RowHeadersWidth           = 5;
     dtgHangHoa.EnableHeadersVisualStyles = false;
     dtgHangHoa.ColumnHeadersDefaultCellStyle.BackColor = Color.Cyan;
     dtgHangHoa.AllowUserToResizeColumns = false;
 }
Exemplo n.º 2
0
 private void Form2_Load_1(object sender, EventArgs e)
 {
     tbNgayBan.Text           = DateTime.Now.ToString("dd-MM-yyyy");
     dataGridView1.DataSource = HangHoaBUS.GetData();
 }
Exemplo n.º 3
0
 private void HienThi()
 {
     dgvHH.DataSource = bus.GetData();
 }