示例#1
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            String time        = dtpDate.Value.Year.ToString() + "-" + dtpDate.Value.Month.ToString() + "-" + dtpDate.Value.Day.ToString() + " " + dtpTime.Value.Hour.ToString() + ":" + dtpTime.Value.Minute.ToString() + ":0";
            String machuyendi  = txtMaChuyenDi.Text;
            int    cmt         = int.Parse(cbbTaiXe.SelectedValue.ToString());
            String biensoxe    = cbbXe.SelectedValue.ToString();
            String madiadiemkh = cbbDiaDiemKhoiHanh.SelectedValue.ToString();
            String madiadiemkt = cbbDiaDiemKetThuc.SelectedValue.ToString();

            if (madiadiemkh == madiadiemkt)
            {
                MessageBox.Show("Lịch Trình Bị Sai");
            }
            else
            {
                DAO.LichTrinhDAO.Instance.ThemLichTrinh(machuyendi, time, cmt, biensoxe, madiadiemkt, madiadiemkh);
                FormThemVe frm = new FormThemVe();
                frm.ShowDialog();
                this.Close();
            }
        }
示例#2
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            FormThemVe frm = new FormThemVe();

            frm.ShowDialog();
        }