private void btnSua_Click(object sender, EventArgs e)
        {
            int rowIndex = dtgChuyenDi.CurrentCell.RowIndex;
            DataGridViewRow row = dtgChuyenDi.Rows[rowIndex];
            int maChuyen = int.Parse(row.Cells["MaChuyenDi"].Value.ToString());

            QUANLYXEKHACHEntities db = new QUANLYXEKHACHEntities();
            tblChuyenDi chuyenDi = db.tblChuyenDis.Where(t => t.MaChuyenDi == maChuyen).SingleOrDefault();

            frmLichChuyenDi form = new frmLichChuyenDi(chuyenDi);
            form.Show();
        }
 private void btLichChuyenDi_Click(object sender, EventArgs e)
 {
     if (checkTab("Lịch Chuyến Đi") == false)
     {
         frmLichChuyenDi form = new frmLichChuyenDi();
         AddTabControl(form, "Lịch Chuyến Đi");
     }
 }
Esempio n. 3
0
 private void btThem_Click(object sender, EventArgs e)
 {
     frmLichChuyenDi form = new frmLichChuyenDi();
     form.ShowDialog();
     frmQuanLyChuyenDi_Load(sender, e);
 }
 private void btThem_Click(object sender, EventArgs e)
 {
     frmLichChuyenDi form = new frmLichChuyenDi();
     form.Show();
 }