public ActionResult PhotoGrapherList() { PhotoGrapherProfileViewModel obj = new PhotoGrapherProfileViewModel(); obj.ProfilepictureList = Db.ProfilePictures.Include("Pht").Where(x => x.status == "Deactive").ToList(); return(View(obj)); }
public ActionResult PhotoGrapherProfile(int id) { int clientid = ClientID; //Fetch The Client Name var a = Db.Clients.Where(x => x.ClientId == clientid).SingleOrDefault(); ViewBag.ClientName = a.Name; ViewBag.ClientID = a.ClientId; ViewBag.photographerid = id; //id = 1; //ViewBag.photoGrapherId = 1; //ViewBag.DateTime = System.DateTime.Now; PhotoGrapherProfileViewModel obj = new PhotoGrapherProfileViewModel(); obj.PhotoGrapher = Db.PhotoGraphers.Where(x => x.PhotoGrapherId == id).FirstOrDefault(); obj.Award = Db.PhotoGrapherAwards.Include("Awards").Where(x => x.Fk_PhotoGrapher_ID == id).ToList(); //inclue name showed be same navigation property name obj.Experience = Db.PhotoGrapherExperiences.Include("experinces").Where(x => x.Fk_PhotoGrapher_ID == id).ToList(); //inclue name showed be same navigation property name obj.Skill = Db.PhotoGrapherSkills.Include("Skills").Where(x => x.Fk_PhotoGrapher_ID == id).ToList(); //inclue name showed be same navigation property name obj.type = Db.PhotoGrapherPhotoGraphyTypes.Include("PhotoGraphyTypes").Where(x => x.Fk_PhotoGrapher_ID == id).ToList(); //inclue name showed be same navigation property name obj.priceDetail = Db.PriceDetails.Where(x => x.Fk_PhotoGrapher_ID == id).ToList(); //inclue name showed be same navigation property name obj.Basic_Profile = Db.PhotoGrapherBasicProfiles.Where(x => x.Fk_PhotoGrapher_ID == id).FirstOrDefault(); //inclue name showed be same navigation property name obj.Albams = Db.Albums.Where(x => x.Fk_PhotoGrapher_ID == id && x.Status == "Public").ToList(); //inclue name showed be same navigation property name obj.Gallary = Db.PhotoUploadGallarys.Where(x => x.Fk_PhotoGrapher_ID == id && x.Shared == "public").OrderByDescending(x => x.PhotoID).ToList(); obj.p_Picture = Db.ProfilePictures.Where(x => x.Fk_PhotoGrapher_ID == id && x.status == "Deactive").FirstOrDefault(); //Check This Client This PhotoGrapher Ratting or Not var cl = Db.PhotoGrapherFollowers.Where(x => x.Fk_Client_id == clientid && x.Fk_PhotoGrapher_ID == id).SingleOrDefault(); if (cl != null) { obj.Follower = cl; } else { ViewBag.f = "Follow"; } ViewBag.TotalFollower = social.TotalFollowers(id); ViewBag.TotalRatting = social.TotalRatting(id); return(View(obj)); }
public ActionResult Profile() { ViewBag.photoGrapherId = PhotoGrapherID; ViewBag.DateTime = System.DateTime.Now; PhotoGrapherProfileViewModel obj = new PhotoGrapherProfileViewModel(); obj.PhotoGrapher = Db.PhotoGraphers.Where(x => x.PhotoGrapherId == PhotoGrapherID).FirstOrDefault(); obj.Award = Db.PhotoGrapherAwards.Include("Awards").Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.Experience = Db.PhotoGrapherExperiences.Include("experinces").Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.Skill = Db.PhotoGrapherSkills.Include("Skills").Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.type = Db.PhotoGrapherPhotoGraphyTypes.Include("PhotoGraphyTypes").Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.priceDetail = Db.PriceDetails.Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.Albams = Db.Albums.Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).ToList(); //inclue name showed be same navigation property name obj.Gallary = Db.PhotoUploadGallarys.Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).OrderByDescending(x => x.PhotoID).ToList(); var picture = Db.ProfilePictures.Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID && x.status == "Deactive").FirstOrDefault(); if (picture != null) { obj.p_Picture = picture; } else { ViewBag.p = "Picture"; } var profileexist = Db.PhotoGrapherBasicProfiles.Where(x => x.Fk_PhotoGrapher_ID == PhotoGrapherID).FirstOrDefault(); //inclue name showed be same navigation property name if (profileexist != null) { obj.Basic_Profile = profileexist; } ViewBag.TotalFollower = social.TotalFollowers(PhotoGrapherID); ViewBag.TotalRatting = social.TotalRatting(PhotoGrapherID); //skill list obj.sk = Db.Skills.ToList(); //experience List obj.ex = Db.Experiences.ToList(); //award List obj.aw = Db.Awards.ToList(); //photography type list obj.ty = Db.PhotoGraphyTypes.ToList(); return(View(obj)); }
public ActionResult PortfolioPhotos(int id, string AlbamName) { ViewBag.alabamname = AlbamName; PhotoGrapherProfileViewModel obj = new PhotoGrapherProfileViewModel(); // obj.AlbamPhotos = Db.AlbamPhoto.Where(x =>x.Albam_ID==id).OrderByDescending(x=>x.AlbamPhotoID).ToList(); obj.AlbamPhotos = albam.GetAll_Albam_Photo(id).ToList(); return(View(obj)); }
public ActionResult Index() { PhotoGrapherProfileViewModel obj = new PhotoGrapherProfileViewModel(); // obj.PhotoGrapher = Db.PhotoGraphers.Where().FirstOrDefault(); // obj.Basic_Profile = Db.PhotoGrapherBasicProfiles.Where(x => x.Fk_PhotoGrapher_ID == 1).FirstOrDefault(); //inclue name showed be same navigation property name //obj.Albams = Db.Albums.Where(x => x.Fk_PhotoGrapher_ID == 1 && x.Status == "Public").ToList(); //inclue name showed be same navigation property name obj.Gallary = Db.PhotoUploadGallarys.Include("PhotoGrapher").Where(x => x.Shared == "public").OrderByDescending(x => x.PhotoID).ToList(); obj.ProfilepictureList = Db.ProfilePictures.Include("Pht").Where(x => x.status == "Deactive").ToList(); ViewBag.jobpost = Db.ClientJobsPosts.Where(x => x.FkClientID == ClientID).ToList(); return(View(obj)); }