コード例 #1
0
        private void LoadUser()
        {
            busGroup = new BUS.BUStblGROUP();
            busGroupUser = new BUS.BUStblGROUPUSER();
            busNhanVien = new BUS.BUSNHANVIEN();
            busUser = new BUS.BUStblUSER();
            busChucVu = new BUS.BUSCHUCVU();
            var _User = from a in busNhanVien.LayTatCaNHANVIEN()
                        join b in busUser.LayTatCatblUSER() on a.MANV equals b.USERID
                        //join c in busGroupUser.LayTatCatblGROUPUSER() on b.USERID equals c.USERID
                        //join d in busGroup.LayTatCatblGROUP() on c.GROUPID equals d.GROUPID
                        join e in busChucVu.LayTatCaCHUCVU() on a.MACV equals e.MACV
                        select new
                        {
                            HoTen = a.TENNV,
                            UserID = b.USERID,
                            Password = b.PASSWORDS,
                           ChucVu = e.TENCV,
                            //Group = d.GROUPNAME,
                            LastLogin = b.LASTLOGIN,
                            LastPassChanged = b.LASTCHANGEDPASS,
                            //GroupID = d.GROUPID
                        };
            grdUser.DataSource = _User.ToList();
             grdvUser.MoveFirst();

            //Binding();
        }
コード例 #2
0
 protected override void OnFirstLoad()
 {
     backgroundWorker.RunWorkerAsync();
     txtNhanVien.Text = clsXuLy.MANV.ToString();
     BUS.BUSPHONG _busPhong = new BUS.BUSPHONG();
     BUS.BUSNHANVIEN _busNhanVien = new BUS.BUSNHANVIEN();
     BUS.BUSKHACHHANG _busKhachHang = new BUS.BUSKHACHHANG();
     BUS.BUSKIEUPHONG _busKieuPhong = new BUS.BUSKIEUPHONG();
     BUS.BUSLOAIPHONG _busLoaiPhong = new BUS.BUSLOAIPHONG();
     BUS.BUSBANGGIA _busBangGia = new BUS.BUSBANGGIA();
     BUS.BUSTINHTRANG _busTinhTrang = new BUS.BUSTINHTRANG();
     lstTinhTrang = _busTinhTrang.LayTatCaTINHTRANG();
     lstBangGia = _busBangGia.LayTatCaBANGGIA();
     lstLoaiPhong = _busLoaiPhong.LayTatCaLOAIPHONG();
     lstKieuPhong = _busKieuPhong.LayTatCaKIEUPHONG();
     lstPhong = _busPhong.LayTatCaPHONG();
     lstNhanVien = _busNhanVien.LayTatCaNHANVIEN();
     lstKhachHang = _busKhachHang.LayTatCaKHACHHANG();
     glkKhachHang.Properties.DataSource = lstKhachHang;
     glkKhachHang.Properties.DisplayMember = "HOTEN";
     glkKhachHang.Properties.ValueMember = "MAKH";
     txtNhanVien.Text = clsXuLy.MANV.ToString();
     ccbeMaPhong.Properties.DataSource = lstPhong;
     ccbeMaPhong.Properties.DisplayMember = "MAPHONG";
     ccbeMaPhong.Properties.ValueMember = "MAPHONG";
     scheControl.OptionsCustomization.AllowInplaceEditor = UsedAppointmentType.None;
     scheControl.OptionsCustomization.AllowAppointmentDrag = UsedAppointmentType.None;
     scheControl.OptionsCustomization.AllowAppointmentResize = UsedAppointmentType.None;
     scheControl.OptionsCustomization.AllowAppointmentDelete = UsedAppointmentType.None;
     schedulerStrorage.Resources.DataSource = lstPhong;
     schedulerStrorage.Resources.Mappings.Caption = "MAPHONG";
     schedulerStrorage.Resources.Mappings.Id = "MAPHONG";
     scheControl.GroupType = SchedulerGroupType.Resource;
     scheControl.GoToToday();
 }
コード例 #3
0
        private void LoadNV()
        {
            busNhanVien = new BUS.BUSNHANVIEN();
            busUser = new BUS.BUStblUSER();
            var _NV = (from a in busNhanVien.LayTatCaNHANVIEN()
                       where !(from b in busUser.LayTatCatblUSER()
                               select b.USERID).Contains(a.MANV)
                       select a);

            cmbMaNV.DataSource = _NV.ToList();
            cmbMaNV.DisplayMember = "MANV";
            cmbMaNV.ValueMember = "MANV";
        }
コード例 #4
0
ファイル: usrHoaDon.cs プロジェクト: WendyAnne/Hotel-software
 private void usrHoaDon_Load(object sender, EventArgs e)
 {
     BUS.BUSNHANVIEN _NhanVien = new BUS.BUSNHANVIEN();
     BUS.BUSPHIEUNHANPHONG _NhanPhong = new BUS.BUSPHIEUNHANPHONG();
     NhanVien = _NhanVien.LayTatCaNHANVIEN();
     NhanPhong = _NhanPhong.LayTatCaPHIEUNHANPHONG();
     cmbMaNV.DataSource = NhanVien;
     cmbMaNV.DisplayMember = "TENNV";
     cmbMaNV.ValueMember = "MANV";
     cmbMaPhieu.DataSource = NhanPhong;
     cmbMaPhieu.DisplayMember = "MAPHIEU";
     cmbMaPhieu.ValueMember = "MAPHIEU";
     LoadHoaDon();
     backgroundWorker1.RunWorkerAsync();
 }