public ucDatLichDuChi() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.HuyDongVon;component/DuChi/ucDatLichDuChi.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); cmbDuChiTheo.Focus(); }
/// <summary> /// Khoi tao /// </summary> #region Khoi tao public ucTraNoTruocHanCT() { InitializeComponent(); HeThong htHeThong = new HeThong(); htHeThong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTT;component/TraNoTruocHan/ucTraNoTruocHanCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += new RoutedEventHandler(btnShortcutKey_Click); } } BindHotkey(); ClearForm(); }
public ucGiaiToaTKCT() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.HuyDongVon;component/GiaoDich/ucGuiThemTienGT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); txtSoTKPT.Focus(); }
/// <summary> /// Khoi tao /// </summary> #region Khoi tao public ucTLDuPhongDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTT;component/TrichLapDuPhong/ucTLDuPhongDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; }
private void HideControl() { HeThong hethong = new HeThong(); ArrayList arr = new ArrayList(); if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_SA.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTTW.layGiaTri())) { arr = hethong.SetVisibleControl("PresentationWPF.DanhMuc.PhanHeGiaoDich.ucPhanHeGDDS", "MANAGE"); } else { arr = hethong.SetVisibleControl("PresentationWPF.DanhMuc.PhanHeGiaoDich.ucPhanHeGDDS", "SETVALUE"); } foreach (List <string> lst in arr) { object item = gridMain.FindName(lst.First()); string strProperty = lst.ElementAt(1); PropertyInfo prty = item.GetType().GetProperty(strProperty); if (strProperty.Equals("Visibility")) { if (lst.ElementAt(2).Equals("0")) { prty.SetValue(item, Visibility.Collapsed, null); } else if (lst.ElementAt(2).Equals("1")) { prty.SetValue(item, Visibility.Visible, null); } else { prty.SetValue(item, Visibility.Hidden, null); } } else { if (lst.ElementAt(2).Equals("0")) { prty.SetValue(item, false, null); } else { prty.SetValue(item, true, null); } } } }
public ucLichThuPhatVonCT() { InitializeComponent(); HeThong htHeThong = new HeThong(); htHeThong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTT;component/LichThuPhatVon/ucLichThuPhatVonCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += new RoutedEventHandler(btnShortcutKey_Click); } } BindHotkey(); BuildTreeKhuVuc(); InitEvenHanler(); }
public ucKhuVucCT_00() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.DanhMuc;component/KhuVuc/ucKhuVucCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); KhoiTaoComboBox(); ResetForm(); }
public ucDmLoaiHdldDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.NhanSu;component/DanhMuc/ucDmLoaiHdldDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; txtTimKiemNhanh.Focus(); }
public ucSoTaiKhoanDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.KeToan;component/SoTaiKhoan/ucSoTaiKhoanDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); InitCombobox(); TaoTreeView(); }
public ucHeThongTKTHCT() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.KeToan;component/TaiKhoanTongHop/ucHeThongTKTHCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); InitCombobox(); CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.THEM, "", mnuMain, DatabaseConstant.Function.KT_HE_THONG_TKTH); }
private void btnResetPWD_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var nguoidung = gvNguoiDung.GetFocusedDataRow() as DATA.NguoiDungRow; if (nguoidung == null) { return; } if (MsgBox.ShowYesNoDialog(string.Format("Bạn muốn reset mật khẩu cho user: [{0}]?", nguoidung.TenDangNhap)) == DialogResult.Yes) { string defaultPWD = "123456"; nguoidung.MatKhau = HeThong.MaHoaMD5(defaultPWD); MsgBox.ShowSuccessfulDialog(string.Format("Mật khẩu mới của user:[{0}] là {1}", nguoidung.TenDangNhap, defaultPWD)); OnSave(); } }
/// <summary> /// InitEventHandler /// </summary> private void InitEventHandler() { HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.DanhMuc;component/Nhom/ucNhomDS_01.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } txtTimKiemNhanh.GotFocus += txtTimKiemNhanh_GotFocus; txtTimKiemNhanh.LostFocus += txtTimKiemNhanh_LostFocus; txtTimKiemNhanh.KeyDown += new KeyEventHandler(txtTimKiemNhanh_KeyDown); }
public ucThamSoCT() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.QuanTriHeThong;component/ThamSoHeThong/ucThamSoCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); LoadDuLieu(); txtMaLoaiThamSo.Focus(); }
public ucNhomNSDCT() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.QuanTriHeThong;component/NhomNSD/ucNhomNSDCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); KhoiTaoGridTruyCap(); cmbDonVi.Focus(); }
/// <summary> /// InitEventHandler /// </summary> private void InitEventHandler() { HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.HuyDongVon;component/DangKyRutGoc/ucDangKyRutGocDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } txtTimKiemNhanh.GotFocus += txtTimKiemNhanh_GotFocus; txtTimKiemNhanh.LostFocus += txtTimKiemNhanh_LostFocus; txtTimKiemNhanh.TextChanged += txtTimKiemNhanh_TextChanged; }
private void FrmBase_Load(object sender, EventArgs e) { try { var p = HeThong.LayPhanQuyen(ChucNang, HeThong.TenDangNhap, false); if (p == null) { return; } _quyen = p; EnableControls(true, true, true); LockControls(true); } catch { } }
public async Task <JsonResult> CheckUserCN(int Iduser, int Idchinhanh) { bool result = true; HeThong <Tblquanlychinhanh> dataNhanVien = new HeThong <Tblquanlychinhanh>(); string apinv = "values/QuanLyChiNhanh"; var a = await dataNhanVien.GetList(apinv); var email = a.Where(x => x.Iduser == Iduser && x.Idchinhanh == Idchinhanh).FirstOrDefault(); if (email != null) { result = false; } // return JsonType(result, JsonRequestBehavior.AllowGet); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ucDSGiaoDichGuiThem() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.HuyDongVon;component/GiaoDich/ucDSGiaoDichGuiThem.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radpage.PageSize = (int)nudPageSize.Value; LoadDuLieu(); }
public ucLaiNhapGocDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.HuyDongVon;component/GiaiToaTK/ucGiaiToaTKDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radpage.PageSize = (int)nudPageSize.Value; LoadDuLieu(); txtTimKiemNhanh.Focus(); }
public ucChuyenDiaBanDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.KhachHang;component/ChuyenDiaBan/ucChuyenDiaBanDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += tlbHotKey_Click; } } BindHotkey(); radpage.PageSize = (int)nudPageSize.Value; KhoiTaoCombobox(); LoadDuLieu(); }
public ucTyGiaCT() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TyGia;component/TyGia/ucTyGiaCT.xaml", ref Toolbar, ref mnuMain); foreach (var item in mnuMain.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindShortkey(); KhoiTaoComboBox(); InitEventHanler(); ClearForm(); }
public ucLichHopDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.DanhMuc;component/LichHop/ucLichHopDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += tlbHotKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; LoadDuLieu(); txtTimKiemNhanh.Focus(); }
public ucRegistration() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.Job;component/Subscribe/ucRegistration.xaml", ref Toolbar, ref mnuGrid); updateContextMenu(); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; tlbResetpass.IsEnabled = false; LoadDuLieu(); }
/// <summary> /// Khoi tao /// </summary> #region Khoi tao public ucDCLaiSuatDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTT;component/DieuChinhLaiSuat/ucDCLaiSuatDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; ClearForm(); BuildTreeKhuVuc(); //LoadData(); }
public ucPhanLoaiDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.KeToan;component/PhanLoai/ucPhanLoaiDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += tlbHotKey_Click; } } BindHotkey(); radPage.PageSize = (int)nudPageSize.Value; InitCombobox(); TaoTreeView(); cmbDonVi.SelectionChanged += new SelectionChangedEventHandler(cmbDonVi_SelectionChanged); }
public ucSanPhamDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTD;component/SanPham/ucSanPhamDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); LoadTreeview(); LoadCombobox(); dtNgayHieuLucDen.Value = null; dtNgayHieuLucTu.Value = null; }
public ucKiemSoatRuiRoDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDungTD;component/KiemSoatRuiRo/ucKiemSoatRuiRoDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); LoadTreeview(); teldtNgayKiemSoatTu.Value = null; teldtNgayKiemSoatDen.Value = null; radPage.PageIndexChanging += new EventHandler <PageIndexChangingEventArgs>(radPage_PageIndexChanging); }
/// <summary> /// Lưu lại cấu hình hệ thống /// Cuongdb 22/2/2008 /// </summary> private void LuuCauHinh() { try { string StrConn = "Data Source=" + txtDiaChiCSDL.Text.Trim() + ";Initial Catalog=" + txtTenCSDL.Text.Trim() + ";User ID=" + txtTenNguoiDung.Text.Trim() + ";Password="******"DiaChiCSDL"].Value = HeThong.MaHoa(txtDiaChiCSDL.Text.Trim()); config.AppSettings.Settings["TenCSDL"].Value = HeThong.MaHoa(txtTenCSDL.Text.Trim()); config.AppSettings.Settings["User_ID"].Value = HeThong.MaHoa(txtTenNguoiDung.Text.Trim()); config.AppSettings.Settings["MatKhau"].Value = HeThong.MaHoa(txtMatKhau.Text.Trim()); config.AppSettings.Settings["Conn"].Value = StrConn; config.Save(ConfigurationSaveMode.Modified); new Taxi.MessageBox.MessageBoxBA().Show("Cập nhật thay đổi tham số hệ thống thành công. Chương trình sẽ khởi động lại", "Thông báo", Taxi.MessageBox.MessageBoxButtonsBA.OK, Taxi.MessageBox.MessageBoxIconBA.Information); Application.Restart(); } catch { new Taxi.MessageBox.MessageBoxBA().Show("Không cập nhật được thay đổi tham số hệ thống", "Thông báo", Taxi.MessageBox.MessageBoxButtonsBA.OK, Taxi.MessageBox.MessageBoxIconBA.Error); } }
public Winner(Form x, HeThong y, Player pl, WindowsMediaPlayer z) { InitializeComponent(); DoubleBuffered = true; parent = x; Player = y; wplayer = z; winner = pl; //DataSet data = new DataSet(); //DataTable tb = new DataTable(); //listBox1.DataSource = tb; for (int i = 0; i < Player.PlayerList().ListPLayer.Count; i++) { listBox1.Items.Add(Player.PlayerList().ListPLayer[i].Nickname); listBox2.Items.Add(Player.PlayerList().ListPLayer[i].Point); } labelWinner.Text = winner.Nickname; }
/// <summary> /// Khoi tao /// </summary> #region Khoi tao public ucDangKySanPhamDS() { InitializeComponent(); HeThong hethong = new HeThong(); hethong.DuyetQuyenTinhNangToolbar("/PresentationWPF.TinDung;component/SanPham/ucDangKySanPhamDS.xaml", ref Toolbar, ref mnuGrid); foreach (var item in mnuGrid.Items) { if (item is MenuItem) { ((MenuItem)item).Click += btnShortcutKey_Click; } } BindHotkey(); nudPageSize.Value = ClientInformation.SoLuongBanGhi; radPage.PageSize = (int)nudPageSize.Value; KhoiTaoControl(); BuildTreePhuongThucVay(); LoadDuLieu(); }