コード例 #1
0
ファイル: UcTraVe.cs プロジェクト: SkyFamily/BanVeTauver2
        private void btnHuyGhe_Click(object sender, EventArgs e)
        {
            if (!KiemTraHopLeVaThongBao())
                return;

            var dataSource = tileView.DataSource as List<GheModel>;

            if (dataSource != null)
            {
                var dsGhe = dataSource.Where(g => g.CoTheDat).ToList();

                foreach (var ghe in dsGhe)
                {
                    var fChinh = ParentForm as FChinh;

                    if (fChinh != null)
                    {
                        //var nhanVienId = fChinh.UserId;

                        var giaoDich = GiaoDichDal.LayGiaoDich(ghe.GiaoDichId);
                        var lichTrinhTuyenDuongs = LichTrinhTuyenDuongDal.LayLichTrinhGiaoDich(ghe.GiaoDichId);

                        var fCapNhatThongTin = new FCapNhatThongTinVe(lichTrinhTuyenDuongs, ghe, giaoDich.NhanVienId);

                        fCapNhatThongTin.ShowDialog();

                        CapNhatLichTrinh();
                    }

                }
            }
        }
コード例 #2
0
ファイル: UCBanVe.cs プロジェクト: SkyFamily/BanVeTau
        private void btnDatGhe_Click(object sender, EventArgs e)
        {
            if (!KiemTraHopLeVaThongBao())
                return;

            var dataSource = tileView.DataSource as List<GheModel>;

            if (dataSource != null)
            {
                var dsGhe = dataSource.Where(g => g.DaDuocDat).ToList();

                foreach (var ghe in dsGhe)
                {
                    var fChinh = ParentForm as FChinh;

                    if (fChinh != null)
                    {
                        var nhanVienId = fChinh.UserId;
                        var fCapNhatThongTin = new FCapNhatThongTinVe(SelectedListTuyenDuong, ghe, nhanVienId);

                        fCapNhatThongTin.ShowDialog();

                        CapNhatLichTrinh();
                    }

                }
            }
        }