/// <summary> /// 获取字段,首选默认,MyTexts做为value值 /// </summary> /// <returns></returns> public static SelectList GetSysField(string table, string colum) { if (string.IsNullOrWhiteSpace(table) || string.IsNullOrWhiteSpace(colum)) { List <SelectList> sl = new List <SelectList>(); return(new SelectList(sl)); } // var account = AccountModel.GetCurrentAccount(); var vertion = AccountModel.GetVersion(); if (colum == "GoldTempId") { GoldTempBLL gold = new GoldTempBLL(); return(new SelectList(gold.GetByVertion(vertion), "Id", "Name")); } else if (colum == "Style") { InsuranceBLL ins = new InsuranceBLL(); return(new SelectList(ins.GetByVertion(vertion), "Id", "Name")); } else if (colum == "CityId") { CityBLL city = new CityBLL(); return(new SelectList(city.GetByVertion(vertion), "Name", "Name")); } else if (colum == "PoliceAccountNatureId") { PoliceAccountNatureBLL police = new PoliceAccountNatureBLL(); return(new SelectList(police.GetByVertion(vertion), "Name", "Name")); } else if (colum == "RuleId") { RuleBLL rule = new RuleBLL(); return(new SelectList(rule.GetByVertion(vertion), "Id", "Name")); } ISysFieldHander baseDDL = new SysFieldHander(); return(new SelectList(baseDDL.GetSysField(table, colum), "MyTexts", "MyTexts")); }
/// <summary> /// 获取当前登陆人的唯一数字标识 /// </summary> /// <returns></returns> public int GetVersion() { return(AccountModel.GetVersion()); }