public CRM_JsonModel CRM_Login(Hashtable ht, string where = "") { int RowCount = 0; BLLCommon common = new BLLCommon(); try { DataTable modList = CurrentDal.GetListByPage(ht, out RowCount, false, where); //定义JSON标准格式实体中 CRM_JsonModel jsonModel = null; if (modList == null || modList.Rows.Count <= 0) { jsonModel = new CRM_JsonModel() { errNum = 999, errMsg = "无数据", retData = "" }; return(jsonModel); } DataTable orgDt = new Sys_RoleOfUserDal().GetUserByRegisterOrg(modList.Rows[0]["RegisterOrg"].ToString()); List <Dictionary <string, object> > list = new List <Dictionary <string, object> >(); List <Dictionary <string, object> > orglist = new List <Dictionary <string, object> >(); list = common.DataTableToList(modList); orglist = common.DataTableToList(orgDt); jsonModel = new CRM_JsonModel() { errNum = 0, errMsg = "success", retData = list, orgData = orglist }; return(jsonModel); } catch (Exception ex) { CRM_JsonModel jsonModel = new CRM_JsonModel() { errNum = 400, errMsg = ex.Message, retData = "" }; return(jsonModel); } }
public JsonModel GetUserByRegisterOrg(string registerOrg) { DataTable userDt = new Sys_RoleOfUserDal().GetUserByRegisterOrg(registerOrg); return(GetJsonModelByDataTable(userDt)); }