Exemple #1
0
 private void cmbMahd_TextChanged(object sender, EventArgs e)
 {
     DataTable tb = dalHD.ThongTinThanhToan(cmbMahd.Text);
     dgvThongtin.DataSource = tb;
     dtpNgayVao.Text = cn.GetValue(@"select NgayVao from tblHoaDon where MaHD = '" + cmbMahd.Text + "'");
     dtpNgayra.Text = cn.GetValue(@"select NgayRa from tblHoaDon where MaHD = '" + cmbMahd.Text + "'");
 }
Exemple #2
0
        private void cmbMahd_TextChanged(object sender, EventArgs e)
        {
            //load dgvThongTin
            DataTable tb = dalHD.ThongTinThanhToan(cmbMahd.Text);

            dgvThongtin.DataSource = tb;
            dtpNgayVao.Text        = cn.GetValue(@"select NgayVao from tblHoaDon where MaHD = '" + cmbMahd.Text + "'");
            string ngayra = cn.GetValue(@"select NgayRa from tblHoaDon where MaHD = '" + cmbMahd.Text + "'");

            if (ngayra != "01/01/1900 12:00:00 AM")
            {
                dtpNgayra.Text    = ngayra;
                dtpNgayra.Enabled = false;
            }
            else
            {
                dtpNgayra.ResetText();
                dtpNgayra.Enabled = true;
            }
        }