Exemple #1
0
        //

        void NewDieuXe()
        {
            DieuXe DX = new DieuXe(dGxe.CurrentRow.Cells[1].Value.ToString(), "Chờ", 0, Int16.Parse(dGKeHoach.CurrentRow.Cells[0].Value.ToString()), thuccho, 0, 0, 0, 0, ngaydi, ngayve);

            DieuXe.addDieuxe();
            dgNhomXe.DataSource = DieuXe.HienthiDieuxe(dGKeHoach.CurrentRow.Cells[0].Value.ToString());
            DonHang._addSoLuongXe(DieuXe.Madon);
            DonHang._updateKLuongConlai(DieuXe.Madon, klcl - thuccho);
            dGKeHoach.DataSource = DonHang.hienthi("Chờ");
            dGxe.DataSource      = Xe.HienThiDSTDieuXe(ngaydi);
        }
Exemple #2
0
        private void dGKeHoach_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            ngaydi = DateTime.Parse(dGKeHoach.CurrentRow.Cells[5].Value.ToString());
            ngayve = ngaydi.AddHours(Int16.Parse(dGKeHoach.CurrentRow.Cells[8].Value.ToString()) * 2 / 40);

            lbKhachHang.Text    = "Khách Hàng :";
            lbMadon.Text        = "";
            lbKhachHang.Text   += dGKeHoach.CurrentRow.Cells[1].Value.ToString();
            lbMadon.Text       += dGKeHoach.CurrentRow.Cells[0].Value.ToString();
            dGxe.DataSource     = Xe.HienThiDSTDieuXe(ngaydi);
            dgNhomXe.DataSource = DieuXe.DSDieuXe(dGKeHoach.CurrentRow.Cells[0].Value.ToString());
        }