protected void Page_PreInit(object sender, EventArgs e) { isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { MasterPageFile = "~/PopupMasterPage.master"; } else { MasterPageFile = "~/Default.master"; Default SetClassActive = this.Master as Default; SetClassActive.page = "LOGTHIETBIMOBILE"; } }
protected void Page_Load(object sender, EventArgs e) { isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { Panel_Web.Visible = true; _ucLogSuCo_Web.LoadData(); } else { Panel_Mobile.Visible = true; _ucLogSuCo_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { //Default SetClassActive = this.Master as Default; //SetClassActive.page = "LOGTHIETBI"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { Panel_Web.Visible = true; _ucLogThietBi_Web.LoadData(); } else { Panel_Mobile.Visible = true; _ucLogThietBi_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { Default SetClassActive = this.Master as Default; SetClassActive.page = "PHONG"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { Panel_Web.Visible = true; _ucPhong_Web.LoadData(); } else { Panel_Mobile.Visible = true; _ucPhong_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { Site SetClassActive = this.Master as Site; SetClassActive.page = "DONVI"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { ucDonVi_Web.Visible = true; ucDonVi_Web.LoadData(); } else { ucDonVi_Mobile.Visible = true; ucDonVi_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { Site SetClassActive = this.Master as Site; SetClassActive.page = "DONVITAISAN"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { DevExpress.Web.ASPxClasses.ASPxWebControl.RegisterBaseScript(this); ucDonViTaiSan_Web.Visible = true; ucDonViTaiSan_Web.LoadData(); } else { ucDonViTaiSan_Mobile.Visible = true; ucDonViTaiSan_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { Default SetClassActive = this.Master as Default; SetClassActive.page = "VITRI"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { DevExpress.Web.ASPxClasses.ASPxWebControl.RegisterBaseScript(this); Panel_Web.Visible = true; _ucViTri_Web.LoadData(); } else { Panel_Mobile.Visible = true; _ucViTri_Mobile.LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Default SetClassActive = this.Master as Default; SetClassActive.page = "NHANVIEN"; isMobile = MobileDetect.fBrowserIsMobile(); if (!isMobile) { Panel_Web.Visible = true; _ucNhanVien_Web.LoadData(); } else { Panel_Mobile.Visible = true; _ucNhanVien_Mobile.LoadData(); } } }
public void CreateTreeList() { Boolean IsMobile = MobileDetect.fBrowserIsMobile(); ASPxTreeList_ViTri.AutoGenerateColumns = false; ASPxTreeList_ViTri.ClientInstanceName = "treeList"; ASPxTreeList_ViTri.KeyFieldName = "id"; ASPxTreeList_ViTri.ParentFieldName = "parent_id"; TreeListDataColumn colten = new TreeListDataColumn("ten", "Tên"); ASPxTreeList_ViTri.Columns.Add(colten); ASPxTreeList_ViTri.Width = Unit.Percentage(100); ASPxTreeList_ViTri.Settings.ShowColumnHeaders = false; ASPxTreeList_ViTri.SettingsBehavior.AllowFocusedNode = true; ASPxTreeList_ViTri.SettingsBehavior.FocusNodeOnExpandButtonClick = false; ASPxTreeList_ViTri.SettingsCookies.StoreExpandedNodes = true; ASPxTreeList_ViTri.SettingsCookies.StorePaging = true; ASPxTreeList_ViTri.SettingsDataSecurity.AllowEdit = false; ASPxTreeList_ViTri.SettingsDataSecurity.AllowDelete = false; ASPxTreeList_ViTri.SettingsDataSecurity.AllowInsert = false; ASPxTreeList_ViTri.Styles.AlternatingNode.Enabled = DevExpress.Utils.DefaultBoolean.True; ASPxTreeList_ViTri.ClientSideEvents.CustomDataCallback = "function(s, e) {if(e.result != '') document.location = e.result;}"; ASPxTreeList_ViTri.ClientSideEvents.NodeClick = "function(s, e) { var key = e.nodeKey; treeList.PerformCustomDataCallback(key)}"; ASPxTreeList_ViTri.CustomDataCallback += ASPxTreeList_ViTri_CustomDataCallback; if (IsMobile) { ASPxTreeList_ViTri.Theme = "Moderno"; } else { ASPxTreeList_ViTri.Theme = "Aqua"; } PanelTreeList.Controls.Add(ASPxTreeList_ViTri); }
protected void Page_Load(object sender, EventArgs e) { isMobile = MobileDetect.fBrowserIsMobile(); }
public static List <DoSearch> DoSearch(string request) { int limit = 100; Boolean isMobile = MobileDetect.fBrowserIsMobile(); if (isMobile) { limit = 3; } List <DoSearch> Searchs = new List <DoSearch>(); try { //List<CoSoSF> ListCoSoSF = CoSoSF.search(request).Take(limit).ToList(); //foreach (CoSoSF _CoSoSF in ListCoSoSF) //{ // if (_CoSoSF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_CoSoSF.obj.id, _CoSoSF.obj.ten, "TENCOSO")); // else // Searchs.Add(new DoSearch(_CoSoSF.obj.id, _CoSoSF.obj.subId, "MACOSO")); //} //List<DayySF> ListDayySF = DayySF.search(request).Take(limit).ToList(); //foreach (DayySF _DayySF in ListDayySF) //{ // if (_DayySF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_DayySF.obj.id, string.Format("{0} ({1})", _DayySF.obj.ten, _DayySF.obj.coso != null ? _DayySF.obj.coso.ten : "[Cơ sở]"), "TENDAY")); // else // Searchs.Add(new DoSearch(_DayySF.obj.id, string.Format("{0} ({1})", _DayySF.obj.subId, _DayySF.obj.coso != null ? _DayySF.obj.coso.ten : "[Cơ sở]"), "MADAY")); //} //List<TangSF> ListTangSF = TangSF.search(request).Take(limit).ToList(); //foreach (TangSF _TangSF in ListTangSF) //{ // if (_TangSF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_TangSF.obj.id, string.Format("{0} ({1} - {2})", _TangSF.obj.ten, _TangSF.obj.day != null ? _TangSF.obj.day.coso != null ? _TangSF.obj.day.coso.ten : "[Cơ sở]" : "[Cơ sở]", _TangSF.obj.day != null ? _TangSF.obj.day.ten : "[Dãy]"), "TENTANG")); // else // Searchs.Add(new DoSearch(_TangSF.obj.id, string.Format("{0} ({1} - {2})", _TangSF.obj.subId, _TangSF.obj.day != null ? _TangSF.obj.day.coso != null ? _TangSF.obj.day.coso.ten : "[Cơ sở]" : "[Cơ sở]", _TangSF.obj.day != null ? _TangSF.obj.day.ten : "[Dãy]"), "MATANG")); //} //List<PhongSF> ListPhongSF = PhongSF.search(request).Take(limit).ToList(); //foreach (PhongSF _PhongSF in ListPhongSF) //{ // string strViTri = Libraries.StringHelper.StringViTriPhong(_PhongSF.obj); // if (_PhongSF.match_field.FirstOrDefault().Equals("ten")) // { // Searchs.Add(new DoSearch(_PhongSF.obj.id, string.Format("{0}{1}", _PhongSF.obj.ten, !Object.Equals(strViTri, "") ? " " + strViTri : ""), "TENPHONG")); // } // else // Searchs.Add(new DoSearch(_PhongSF.obj.id, string.Format("{0}{1}", _PhongSF.obj.subId, !Object.Equals(strViTri, "") ? " " + strViTri : ""), "MAPHONG")); //} listDonVi = Permission.getAll <TSCD.Entities.DonVi>(Permission._VIEW).OrderBy(c => c.ten).ToList(); List <CTTaiSanSF> ListCTTaiSanSF = CTTaiSanSF.searchByDonvi(request, listDonVi).Take(limit).ToList(); foreach (CTTaiSanSF _CTTaiSanSF in ListCTTaiSanSF) { if (_CTTaiSanSF.match_field.FirstOrDefault().Equals("taisan.ten")) { Searchs.Add(new DoSearch(_CTTaiSanSF.obj.id, _CTTaiSanSF.obj.taisan.ten, "TENTAISAN")); } } //listDonVi = Permission.getAll<TSCD.Entities.DonVi>(Permission._VIEW).OrderBy(c => c.ten).ToList(); //if (listDonVi != null && listDonVi.Count > 0) //{ // foreach (TSCD.Entities.DonVi _DonVi in listDonVi) // { // List<TaiSanHienThi> listCTTaiSan = TaiSanHienThi.ConvertUsingSearch(_DonVi.getAllCTTaiSanRecursive(), request); // foreach (var TaiSanCustom in listCTTaiSan) // { // Searchs.Add(new DoSearch(TaiSanCustom.id, TaiSanCustom.ten, "TENTAISAN")); // } // } //} //List<ThietBiSF> ListThietBiSF = ThietBiSF.search(request).Take(limit).ToList(); //foreach (ThietBiSF _ThietBiSF in ListThietBiSF) //{ // if (_ThietBiSF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_ThietBiSF.obj.id, _ThietBiSF.obj.ten, "TENTHIETBI")); // else // Searchs.Add(new DoSearch(_ThietBiSF.obj.id, _ThietBiSF.obj.subId, "MATHIETBI")); //} //List<LoaiThietBiSF> ListLoaiThietBiSF = LoaiThietBiSF.search(request).Take(limit).ToList(); //foreach (LoaiThietBiSF _LoaiThietBiSF in ListLoaiThietBiSF) //{ // if (_LoaiThietBiSF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_LoaiThietBiSF.obj.id, _LoaiThietBiSF.obj.ten, "TENLOAITHIETBI")); // else // Searchs.Add(new DoSearch(_LoaiThietBiSF.obj.id, _LoaiThietBiSF.obj.subId, "MALOAITHIETBI")); //} //List<NhanVienPTSF> ListNhanVienPTSF = NhanVienPTSF.search(request).Take(limit).ToList(); //foreach (NhanVienPTSF _NhanVienPTSF in ListNhanVienPTSF) //{ // if (_NhanVienPTSF.match_field.FirstOrDefault().Equals("hoten")) // Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.hoten, "TENNHANVIENPT")); // else if (_NhanVienPTSF.match_field.FirstOrDefault().Equals("sodienthoai")) // Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.sodienthoai, "SDTNHANVIENPT")); // else // Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.subId, "MANHANVIENPT")); //} //List<SuCoPhongSF> ListSuCoPhongSF = SuCoPhongSF.search(request).Take(limit).ToList(); //foreach (SuCoPhongSF _SuCoPhongSF in ListSuCoPhongSF) //{ // if (_SuCoPhongSF.match_field.FirstOrDefault().Equals("ten")) // Searchs.Add(new DoSearch(_SuCoPhongSF.obj.id, _SuCoPhongSF.obj.ten, "TENSUCO")); // else // Searchs.Add(new DoSearch(_SuCoPhongSF.obj.id, _SuCoPhongSF.obj.mota, "MOTASUCO")); //} } catch { } return(Searchs); }
public static List <DoSearch> DoSearch(string request) { int limit = 100; Boolean isMobile = MobileDetect.fBrowserIsMobile(); if (isMobile) { limit = 3; } List <DoSearch> Searchs = new List <DoSearch>(); try { List <CoSoSF> ListCoSoSF = CoSoSF.search(request).Take(limit).ToList(); foreach (CoSoSF _CoSoSF in ListCoSoSF) { if (_CoSoSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_CoSoSF.obj.id, _CoSoSF.obj.ten, "TENCOSO")); } else { Searchs.Add(new DoSearch(_CoSoSF.obj.id, _CoSoSF.obj.subId, "MACOSO")); } } List <DayySF> ListDayySF = DayySF.search(request).Take(limit).ToList(); foreach (DayySF _DayySF in ListDayySF) { if (_DayySF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_DayySF.obj.id, string.Format("{0} ({1})", _DayySF.obj.ten, _DayySF.obj.coso != null ? _DayySF.obj.coso.ten : "[Cơ sở]"), "TENDAY")); } else { Searchs.Add(new DoSearch(_DayySF.obj.id, string.Format("{0} ({1})", _DayySF.obj.subId, _DayySF.obj.coso != null ? _DayySF.obj.coso.ten : "[Cơ sở]"), "MADAY")); } } List <TangSF> ListTangSF = TangSF.search(request).Take(limit).ToList(); foreach (TangSF _TangSF in ListTangSF) { if (_TangSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_TangSF.obj.id, string.Format("{0} ({1} - {2})", _TangSF.obj.ten, _TangSF.obj.day != null ? _TangSF.obj.day.coso != null ? _TangSF.obj.day.coso.ten : "[Cơ sở]" : "[Cơ sở]", _TangSF.obj.day != null ? _TangSF.obj.day.ten : "[Dãy]"), "TENTANG")); } else { Searchs.Add(new DoSearch(_TangSF.obj.id, string.Format("{0} ({1} - {2})", _TangSF.obj.subId, _TangSF.obj.day != null ? _TangSF.obj.day.coso != null ? _TangSF.obj.day.coso.ten : "[Cơ sở]" : "[Cơ sở]", _TangSF.obj.day != null ? _TangSF.obj.day.ten : "[Dãy]"), "MATANG")); } } List <PhongSF> ListPhongSF = PhongSF.search(request).Take(limit).ToList(); foreach (PhongSF _PhongSF in ListPhongSF) { string strViTri = Libraries.StringHelper.StringViTriPhong(_PhongSF.obj); if (_PhongSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_PhongSF.obj.id, string.Format("{0}{1}", _PhongSF.obj.ten, !Object.Equals(strViTri, "") ? " " + strViTri : ""), "TENPHONG")); } else { Searchs.Add(new DoSearch(_PhongSF.obj.id, string.Format("{0}{1}", _PhongSF.obj.subId, !Object.Equals(strViTri, "") ? " " + strViTri : ""), "MAPHONG")); } } List <ThietBiSF> ListThietBiSF = ThietBiSF.search(request).Take(limit).ToList(); foreach (ThietBiSF _ThietBiSF in ListThietBiSF) { if (_ThietBiSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_ThietBiSF.obj.id, _ThietBiSF.obj.ten, "TENTHIETBI")); } else { Searchs.Add(new DoSearch(_ThietBiSF.obj.id, _ThietBiSF.obj.subId, "MATHIETBI")); } } List <LoaiThietBiSF> ListLoaiThietBiSF = LoaiThietBiSF.search(request).Take(limit).ToList(); foreach (LoaiThietBiSF _LoaiThietBiSF in ListLoaiThietBiSF) { if (_LoaiThietBiSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_LoaiThietBiSF.obj.id, _LoaiThietBiSF.obj.ten, "TENLOAITHIETBI")); } else { Searchs.Add(new DoSearch(_LoaiThietBiSF.obj.id, _LoaiThietBiSF.obj.subId, "MALOAITHIETBI")); } } List <NhanVienPTSF> ListNhanVienPTSF = NhanVienPTSF.search(request).Take(limit).ToList(); foreach (NhanVienPTSF _NhanVienPTSF in ListNhanVienPTSF) { if (_NhanVienPTSF.match_field.FirstOrDefault().Equals("hoten")) { Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.hoten, "TENNHANVIENPT")); } else if (_NhanVienPTSF.match_field.FirstOrDefault().Equals("sodienthoai")) { Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.sodienthoai, "SDTNHANVIENPT")); } else { Searchs.Add(new DoSearch(_NhanVienPTSF.obj.id, _NhanVienPTSF.obj.subId, "MANHANVIENPT")); } } List <SuCoPhongSF> ListSuCoPhongSF = SuCoPhongSF.search(request).Take(limit).ToList(); foreach (SuCoPhongSF _SuCoPhongSF in ListSuCoPhongSF) { if (_SuCoPhongSF.match_field.FirstOrDefault().Equals("ten")) { Searchs.Add(new DoSearch(_SuCoPhongSF.obj.id, _SuCoPhongSF.obj.ten, "TENSUCO")); } else { Searchs.Add(new DoSearch(_SuCoPhongSF.obj.id, _SuCoPhongSF.obj.mota, "MOTASUCO")); } } } catch (Exception ex) { Console.Write(ex); } return(Searchs); }