public ActionResult myjobs() { var model = new UserMyJobsModel(); model.userId = _AccountDetails == null ? 0 : _AccountDetails.Id; model.index = 0; //model.JobStatus = ClassLibrary.Enum.JobStatus.Pending; model.JobStatus = ClassLibrary.Enum.JobStatus.fetchAll; model.UserProperties = new List <UserPorpertyModel>(); var properties = _entities.tUserProperties.Where(z => z.UserId == model.userId && z.IsActive && z.IsDynamic == false).ToList(); if (properties.Count > 0) { foreach (var item in properties) { UserPorpertyModel UserProperty = new UserPorpertyModel(); UserProperty.propertyId = item.Id; UserProperty.propertyName = item.PropertyName ?? string.Empty; model.UserProperties.Add(UserProperty); } } model.propertyId = 0; model.workType = ClassLibrary.Enum.WorkType.All; return(View(model)); }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <returns></returns> public PartialViewResult RefreshMyJobsList(UserMyJobsModel model) { //model.UserProperties = new List<UserPorpertyModel>(); //var properties = _entities.tUserProperties.Where(z => z.UserId == model.userId && z.IsActive && z.IsDynamic == false).ToList(); //if (properties.Count > 0) //{ // foreach (var item in properties) // { // UserPorpertyModel UserProperty = new UserPorpertyModel(); // UserProperty.propertyId = item.Id; // UserProperty.propertyName = item.PropertyName ?? string.Empty; // model.UserProperties.Add(UserProperty); // } //} //model.propertyId = 0; return(PartialView("~/Views/User/_pv_User_Myjobs_list.cshtml", model)); }