private void _imgCourse_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { CacheParameterName name = new CacheParameterName(); CacheHelper.SetCache(CacheParameterName.teacherId, (sender as Image).Tag.ToStringEx()); base.ParentWindow.PageSwitch(this.pageswitch.CoursePage); }
private void gotokdp(BACAClient.Model.History model, int index) { try { if (model == null) { this.GetData(); } else if (model.TypeId == 3) { new PDF { Id = model.Id, TypeId = model.TypeId }.Show(); } else { CacheParameterName name = new CacheParameterName(); CacheHelper.SetCache(name.HistoryIndex, index.ToString()); CacheHelper.SetCache(name.Id, model.Id.ToString()); base.ParentWindow.PageSwitch(new PageSwitch().kdp); } } catch { } }
public static InterfacesUsers GetInterfacesUsersModel() { try { CacheParameterName name = new CacheParameterName(); return(new InterfacesUsers { UserId = GetCache(name.LoginUserID), UserName = GetCache(name.UserName), DepName = GetCache(name.UserDepName) }); } catch (Exception) { return(null); } }
public static void SetDellInfo(InterfacesUsers model) { try { if (model != null) { CacheParameterName name = new CacheParameterName(); SetCache(name.LoginUserID, model.UserId); SetCache(name.UserName, model.UserName); SetCache(name.UserDepName, model.DepName); } } catch { } }
private void gotokdp(GoodAndHot model) { BACAClient.Model.Knowledge modelByTypeidAndLngid = new Model.Knowledge(); //todo if (modelByTypeidAndLngid.TypeId == 3) { new PDF { Id = modelByTypeidAndLngid.Id, TypeId = modelByTypeidAndLngid.TypeId }.Show(); } else { CacheParameterName name = new CacheParameterName(); CacheHelper.SetCache(name.HistoryIndex, string.Empty); CacheHelper.SetCache(name.Id, modelByTypeidAndLngid.Id.ToString()); base.ParentWindow.PageSwitch(this.pageswitch.kdp); } }
public static void RemoveAllCache() { try { CacheParameterName name = new CacheParameterName(); SetCache(name.IsReturn, 0.ToString()); SetCache(name.TypeId, string.Empty); SetCache(name.SourceId, (-1).ToString()); SetCache(name.PageIndex, "1"); SetCache(name.Key, string.Empty); SetCache(name.keyword, string.Empty); SetCache(name.Category, string.Empty); SetCache(name.Pages, string.Empty); SetCache(name.Isdell, (-1).ToString()); } catch { } }
public static void SetReturnSearch(ReturnSearch model) { try { CacheParameterName name = new CacheParameterName(); SetCache(name.IsReturn, model.IsReturn); SetCache(name.TypeId, model.TypeId.ToString()); SetCache(name.SourceId, model.SourceId.ToString()); SetCache(name.PageIndex, model.PageIndex.ToString()); SetCache(name.Key, model.Key); SetCache(name.keyword, model.KeyWord); SetCache(name.Category, model.Category); SetCache(name.Pages, model.Pages); SetCache(name.Isdell, model.Isdell.ToString()); } catch { } }
private static void Main(string[] args) { try { DllInfo modelByProcessArguments = LocalDllUtils.GetModelByProcessArguments(); ConfigerParameterName name = new ConfigerParameterName(); CacheParameterName name2 = new CacheParameterName(); if (modelByProcessArguments != null) { if (modelByProcessArguments.IsOpen == 1) { //todo } } new single().Run(args); } catch (Exception) { } }
public static ReturnSearch GetReturnSearchModel() { try { CacheParameterName name = new CacheParameterName(); ReturnSearch search = new ReturnSearch { IsReturn = GetCache(name.IsReturn) }; if (!string.IsNullOrEmpty(GetCache(name.TypeId))) { search.TypeId = int.Parse(GetCache(name.TypeId)); } if (!string.IsNullOrEmpty(GetCache(name.SourceId))) { search.SourceId = int.Parse(GetCache(name.SourceId)); } if (!string.IsNullOrEmpty(GetCache(name.PageIndex))) { search.PageIndex = int.Parse(GetCache(name.PageIndex)); } if (!string.IsNullOrEmpty(GetCache(name.Isdell))) { search.Isdell = int.Parse(GetCache(name.Isdell)); } search.Key = GetCache(name.Key); search.KeyWord = GetCache(name.keyword); search.Category = GetCache(name.Category); search.Pages = GetCache(name.Pages); search.UserId = GetCache(name.LoginUserID); return(search); } catch (Exception) { return(null); } }