コード例 #1
0
 partial void Deleteeducation(education instance);
コード例 #2
0
 partial void Inserteducation(education instance);
コード例 #3
0
 partial void Updateeducation(education instance);
コード例 #4
0
        public ActionResult Education(education parEducation)
        {
            //if (ModelState.IsValid)
            //{
            //    db.personalDetails.Add(personaldetail);
            //    db.SaveChanges();
            //    return RedirectToAction("Index");
            //}
            education educate = (from educates in db2.educations where educates.email == parEducation.email select educates).SingleOrDefault();

            if (educate == null)
            {
                parEducation.createdDate = DateTime.Now;
                db2.educations.InsertOnSubmit(parEducation);
                db2.SubmitChanges();
            }
            else
            {
                educate.modifiedDate = DateTime.Now;
                educate.educationPeriodStart = parEducation.educationPeriodStart;
                educate.educationPeriodEnd = parEducation.educationPeriodEnd;
                educate.fieldOfStudy = parEducation.fieldOfStudy;
                educate.institution = parEducation.institution;
                educate.qualification = parEducation.qualification;
                db2.SubmitChanges();
            }
            return RedirectToAction("CareerProfile", "careerProfile", new { email = Session["userId"].ToString(), id = 0 });
            //return View();
        }