public ActionResult add(List <UserEducation> ue) { PremiumColldetail pd = new PremiumColldetail(); //List<primecollege> pcs = (from pc in db.primecolleges // select new primecollege // { // id = pc.id, // PremiumInstituteNames = pc.PremiumInstituteNames, // ShortForms = pc.ShortForms // } // ).ToList(); List <primecollege> pc = db.primecolleges.ToList(); foreach (var list in ue) { list.IsActive = true; list.CreatedOn = System.DateTime.Now; db.UserEducations.Add(list); db.SaveChanges(); foreach (var pcs in pc) { if (list.InstituteName == pcs.PremiumInstituteNames || list.InstituteName == pcs.ShortForms) { pd.premium_id = pcs.id; pd.UserDetails_id = list.UserDetails_id; pd.UserEducation_id = list.Id; db.PremiumColldetails.Add(pd); db.SaveChanges(); } } } return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult create(UserDetail ud) { ud.IsActive = true; ud.RegistrationDate = DateTime.Now; ud.CreatedOn = System.DateTime.Now; db.UserDetails.Add(ud); db.SaveChanges(); return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult Create(JobDetail job) { if (ModelState.IsValid) { db.JobDetails.Add(job); db.SaveChanges(); } return(RedirectToAction("Index")); }
public ActionResult Create([Bind(Include = "Id,FullName")] Employer employer) { if (ModelState.IsValid) { db.Employers.Add(employer); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employer)); }
public ActionResult Edit(Company company) { if (ModelState.IsValid) { db.Entry(company).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } //ViewBag.IndustryTypeId = new SelectList(db.IndustryTypes, "Id", "IndustryType1", company.IndustryTypeId); return(View(company)); }
public ActionResult Create(Skill skill) { if (ModelState.IsValid) { db.Skills.Add(skill); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(skill)); }
public ActionResult Create([Bind(Include = "Id,Tag")] JobTag jobTag) { if (ModelState.IsValid) { db.JobTags.Add(jobTag); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(jobTag)); }
public ActionResult Create(primecollege primecollege) { if (ModelState.IsValid) { db.primecolleges.Add(primecollege); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(primecollege)); }
public ActionResult Create(Country country) { if (ModelState.IsValid) { db.Countries.Add(country); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(country)); }
public ActionResult Create([Bind(Include = "Id,Title,EmployerID")] JobPost jobpost) { if (ModelState.IsValid) { _db.JobPosts.Add(jobpost); _db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployerID = new SelectList(_db.Employers, "Id", "FullName", jobpost.EmployerID); return(View(jobpost)); }
public ActionResult Create(State state) { if (ModelState.IsValid) { db.States.Add(state); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Country_id = new SelectList(db.Countries, "id", "CountryName", state.CountryId); return(View(state)); }
public ActionResult Create([Bind(Include = "Id_Pozicion,Emri_Poz,Tipi,ID_Kompanie")] PozicionPune pozicionPune) { if (ModelState.IsValid) { db.PozicionPunes.Add(pozicionPune); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_Kompanie = new SelectList(db.Kompanias, "ID_Kompani", "Emri", pozicionPune.ID_Kompanie); return(View(pozicionPune)); }
public ActionResult Create(IndustryType IndustryType) { if (ModelState.IsValid) { IndustryType.CreatedOn = DateTime.Now; IndustryType.Isactive = true; db.IndustryTypes.Add(IndustryType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(IndustryType)); }
public ActionResult Create([Bind(Include = "Id_Aplikim,Pozc_Id,Komp_Id,Orari")] Aplikim aplikim) { if (ModelState.IsValid) { db.Aplikims.Add(aplikim); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Komp_Id = new SelectList(db.Kompanias, "ID_Kompani", "Emri", aplikim.Komp_Id); ViewBag.Pozc_Id = new SelectList(db.PozicionPunes, "Id_Pozicion", "Emri_Poz", aplikim.Pozc_Id); return(View(aplikim)); }
public ActionResult Create(IndustryType businessStream) { businessStream.Isactive = true; businessStream.CreatedOn = System.DateTime.Now; if (ModelState.IsValid) { db.IndustryTypes.Add(businessStream); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(businessStream)); }
public ActionResult Create(PersonalInfo personalInfo) { if (ModelState.IsValid) { db.PersonalInfoes.Add(personalInfo); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Skill_Id = new SelectList(db.Skills, "id", "SkillName", personalInfo.Skill_Id); ViewBag.User_Id = new SelectList(db.UserDetails, "ID", "UserName", personalInfo.User_Id); return(View(personalInfo)); }
public ActionResult Create(PlanMaster planMaster) { if (ModelState.IsValid) { planMaster.Isactive = true; planMaster.CreatedOn = DateTime.Now; db.PlanMasters.Add(planMaster); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(planMaster)); }
public ActionResult Create(City city) { city.Isactive = true; if (ModelState.IsValid) { db.Cities.Add(city); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.State_id = new SelectList(db.States, "id", "StateName", city.StateId); return(View(city)); }
public ActionResult Create(Certification certification) { certification.IsActive = true; certification.CreatedOn = System.DateTime.Now; if (ModelState.IsValid) { db.Certifications.Add(certification); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PersonalInfo_id = new SelectList(db.PersonalInfoes, "id", "id", certification.PersonalInfo_id); return(View(certification)); }
public ActionResult Create(UserExperience userExperience) { userExperience.CreatedOn = System.DateTime.Now; userExperience.IsActive = true; if (ModelState.IsValid) { db.UserExperiences.Add(userExperience); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Company_id = new SelectList(db.Companies, "id", "Companyname", userExperience.Company_id); ViewBag.UserId = new SelectList(db.UserDetails, "ID", "UserName", userExperience.UserId); return(View(userExperience)); }
public ActionResult Create( Location location) { location.IsActive = true; location.CreatedOn = DateTime.Now; if (ModelState.IsValid) { db.Locations.Add(location); db.SaveChanges(); } ViewBag.City_id = new SelectList(db.Cities, "id", "CityName", location.City_id); ViewBag.Country_id = new SelectList(db.Countries, "id", "CountryName", location.Country_id); ViewBag.State_id = new SelectList(db.States, "id", "StateName", location.State_id); return Json("", JsonRequestBehavior.AllowGet); }
public ActionResult Create1(Recruiter recruiter) { if (ModelState.IsValid) { recruiter.Isactive = true; recruiter.ModifiedOn = DateTime.Now; db.Recruiters.Add(recruiter); db.SaveChanges(); } Session["recId"] = recruiter.Id.ToString(); return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult Register(SignupVM signupUser) { if (ModelState.IsValid) { using (db = new JobPortalEntities()) { User user = new User(); user.Name = signupUser.Name; user.UserName = signupUser.Username; byte[] salt = Get_SALT(); user.SALT = salt; user.HASH = Get_HASH_SHA512(signupUser.Password, signupUser.Username, salt); db.Users.Add(user); db.SaveChanges(); ModelState.Clear(); user = null; ViewBag.Message = "Registration Successfull"; } } return(View(signupUser)); }
public ActionResult Create(Lookout lookout, int s, List <PreferredCompany> pc, string lkid) { string[] nameslist = lkid.Split(','); lookout.LastActive = System.DateTime.Now; db.Lookouts.Add(lookout); db.SaveChanges(); foreach (var list in pc) { list.Lookout_id = lookout.Id; db.PreferredCompanies.Add(list); db.SaveChanges(); } PreferredLocation prl = new PreferredLocation(); foreach (var a in nameslist) { int c = Convert.ToInt16(a); Location loc = db.Locations.FirstOrDefault(ax => ax.City_id == c); var l = Convert.ToInt16(loc.id); prl.Location_id = l; prl.Lookout_id = lookout.Id; db.PreferredLocations.Add(prl); db.SaveChanges(); } WorkShift ws = new WorkShift(); Shift shift = db.Shifts.Find(s); ws.Shift_Id = shift.id; ws.Lookout_Id = lookout.Id; db.WorkShifts.Add(ws); db.SaveChanges(); return(Json("", JsonRequestBehavior.AllowGet)); }
public ActionResult SplitId(JobPost jbps, string sid, string lid, string pid, string uid, Company comp) { db.Companies.Add(comp); db.SaveChanges(); var id = comp.Id; jbps.CompanyId = id; jbps.IndustryId = 1; jbps.CreatedOn = DateTime.Now; db.JobPosts.Add(jbps); db.SaveChanges(); //List<int> list = new List<int>(); List <JobPostSkill> jbpost = new List <JobPostSkill>(); string[] split = sid.Split(','); // string[] split = jbps.skill.SkillName.Split(','); foreach (string listid in split) { JobPostSkill jobpostskill = new JobPostSkill(); jobpostskill.SkillId = int.Parse(listid); jobpostskill.Isactive = true; jobpostskill.JobPostId = jbps.Id; db.JobPostSkills.Add(jobpostskill); db.SaveChanges(); } // List<JobLocDet> joblocdet = new List<JobLocDet>(); //string[] splited = jbps.city.CityName.Split(','); string[] splited = lid.Split(','); foreach (string locid in splited) { JobLocDet job = new JobLocDet(); job.CityID = int.Parse(locid); job.Isactive = true; job.CreatedOn = DateTime.Now; job.JobPostId = jbps.Id; // joblocdet.Add(job); db.JobLocDets.Add(job); db.SaveChanges(); } string[] splitted = uid.Split(','); foreach (string Ugid in splitted) { JobUgDet ug = new JobUgDet(); ug.UgId = int.Parse(Ugid); ug.Isactive = true; ug.CreatedOn = DateTime.Now; ug.JobPostId = jbps.Id; db.JobUgDets.Add(ug); db.SaveChanges(); } string[] spl = pid.Split(','); //string[] splitpg = jbps.jobPgDet.splitPgId.Split(','); foreach (string pg in spl) { JobPgDet jobpg = new JobPgDet(); jobpg.PGiD = int.Parse(pg); jobpg.Isactive = true; jobpg.CreatedOn = DateTime.Now; jobpg.JobPostId = jbps.Id; db.JobPgDets.Add(jobpg); db.SaveChanges(); } return(Json("", JsonRequestBehavior.AllowGet)); }
// [ValidateAntiForgeryToken] public ActionResult Create(Company company) { db.Companies.Add(company); db.SaveChanges(); return(Json("", JsonRequestBehavior.AllowGet)); }