示例#1
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());
        }
示例#2
0
 private void dGxe_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     klcl = float.Parse(dGKeHoach.CurrentRow.Cells[4].Value.ToString());
     tt   = float.Parse(dGxe.CurrentRow.Cells[0].Value.ToString());
     if (klcl != 0)
     {
         if (klcl > tt)
         {
             thuccho = tt;
         }
         else
         {
             thuccho = klcl;
         }
         NewDieuXe();
         dgNhomXe.DataSource = DieuXe.DSDieuXe(dGKeHoach.CurrentRow.Cells[0].Value.ToString());
     }
     else
     {
         MessageBox.Show("Đã đủ xe vận chuyển");
     }
 }