/// <summary> /// 新房显示 /// </summary> /// <returns></returns> public List <Property_manage> Property_manageShow() { string sql = "select * from Property_manage a left join Images b on a.Nid=b.New_HouseId left join Property c on a.PropertyId=c.Pid left join [tb_district] d on a.tb_districtId=d.id left join Community e on a.CommunityId=e.Cid where a.PropertyId=1"; var da = _db.GetData(sql); var list = _db.DataTableToList <Property_manage>(da.Tables[0]); return(list); }
/// <summary> /// 管理员登录 /// </summary> /// <param name="a"></param> /// <returns></returns> public Administrator AdministratorLogin(string aname = "", string passwork = "") { string sql = $"select * from Administrator where Aname='{aname}' and Apasswork='{passwork}'"; var da = _db.GetData(sql); var list = _db.DataTableToList <Administrator>(da.Tables[0]); return(list[0]); }
/// <summary> /// 写字楼类型 /// </summary> /// <returns></returns> public List <Officestype> Offices_Type() { string sql = "select * from Officestype"; var da = _db.GetData(sql); var list = _db.DataTableToList <Officestype>(da.Tables[0]); return(list); }
/// <summary> /// 查询显示的方法 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public virtual List <T> Query <T>() { string sql = RefiectionComment.ReflectionSelectSql <T>(); var ds = db.GetData(sql); var list = RefiectionComment.DataTableToList <T>(ds.Tables[0]); return(list); }
/// <summary> /// 用户类型 /// </summary> /// <returns></returns> public List <UserType> UserTypeShow() { string sql = "select * from UserType"; var da = _db.GetData(sql); var list = _db.DataTableToList <UserType>(da.Tables[0]); return(list); }