public ActionResult Landing(FilterList <PropertyShortDisplay> filter) { InitSearchLookups(); var rows = new BLayer().GetAllPropertiesLanding(filter, PropertiesDisplayType.AllBrokers); return(View(rows)); }
public ActionResult RequestDetails(int id) { //var rows = db.Properties.Where(x => !x.IsDeleted && x.IsActive && x.AllowVisitors == true); var rows = new BLayer().GetRequestDetails(id); return(View(rows)); }
public override Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) { //context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" }); return(Task.Factory.StartNew(() => { var userName = context.UserName; var password = context.Password; var user = BLayer.GetUserByLogin(userName, password); if (user != null) { var clams = new List <Claim>() { new Claim(ClaimTypes.Email, user.Email) , new Claim(ClaimTypes.Role, user.UserGroupName) , new Claim(ClaimTypes.Sid, user.UserID.ToString()) , new Claim(ClaimTypes.Name, user.FullName) , new Claim(ClaimTypes.Country, user.ProfileImgPath) }; var identity = new ClaimsIdentity(clams, Startup.OAuthOptions.AuthenticationType); Additional = new Dictionary <string, string>(); Additional.Add("Role", user.UserGroupName); Additional.Add("Name", user.FullName); Additional.Add("UserID", user.UserID.ToString()); context.Validated(new AuthenticationTicket(identity, new AuthenticationProperties() { })); } else { context.SetError("Invalid ", "Email Or Password Error"); } })); }
// GET: Properties public ActionResult Index(int?id) { var filter = new FilterList <PropertyShortDisplay>(); filter.projectID = id; var rows = new BLayer().GetAllPropertiesLanding(filter, PropertiesDisplayType.CurrentUser); //var properties = db.Properties.Where(x=>x.ByUserID==CurrentUser.UserID).Include(p => p.Location).Include(p => p.OwnerShipType).Include(p => p.Project).Include(p => p.PropertyFloorType).Include(p => p.PropertyType).Include(p => p.PropertyPurpose); return(View(rows)); }
public ActionResult PropertyDetails(int id) { //var rows = db.Properties.Where(x => !x.IsDeleted && x.IsActive && x.AllowVisitors == true); var rows = new BLayer().GetPropertyDetails(id); if (rows == null) { return(RedirectToAction("Index")); } return(View(rows)); }
public ActionResult RequestsList() { //var rows = new BLayer().GetAllPropertiesRequests(0); var filter = new FilterList <PropertyShortDisplay>(); int num, size; filter.PageNum = int.TryParse(Request.QueryString["PageNum"], out num) ? num : filter.PageNum; filter.PageSize = int.TryParse(Request.QueryString["PageSize"], out size) ? size : filter.PageSize; var rows = new BLayer().GetAllPropertiesRequests(filter); return(View(filter)); }
public ActionResult Index(FilterList <PropertyShortDisplay> filter) { if (User.Identity.IsAuthenticated) { return(RedirectToAction("Landing")); } //filter.isV = !string.IsNullOrEmpty(Request.QueryString["isV"]) && Request.QueryString["isV"].Equals("on") ? true : false; //ViewBag.PropertyTypes = db.PropertyTypes.ToList()[].PropTypeTitle; InitSearchLookups(); var rows = new BLayer().GetAllPropertiesLanding(filter, PropertiesDisplayType.Visitor); return(View(rows)); }