public ActionResult ValidateUpdate(String first_name, String last_name, String sex, String avatar, String birthday, String email, String phone, String idcard, String address, String decsription)
 {
     if (HttpContext.Session["userID"] == null)
     {
         TempData["Message"] = "Vui lòng đăng nhập tài khoản ";
         return(RedirectToAction("DangNhap", "FrontEnd"));
     }
     else
     {
         int     userID     = Convert.ToInt32(HttpContext.Session["userID"]);
         PROFILE getProfile = db.PROFILEs.Find(userID);
         getProfile.ADDRESS         = address;
         getProfile.SEX             = sex;
         getProfile.IDENTITY_CARD   = idcard;
         getProfile.LAST_NAME       = last_name;
         getProfile.FIRST_NAME      = first_name;
         getProfile.AVATAR          = avatar;
         getProfile.BIRTHDAY        = birthday;
         getProfile.EMAIL           = email;
         getProfile.PHONE           = Convert.ToInt32(phone);
         getProfile.DESCRIPTION     = decsription;
         db.Entry(getProfile).State = EntityState.Modified;
         db.SaveChanges();
         TempData["Message"] = "Cập nhập thành công hồ sơ";
         return(RedirectToAction("Profile", "CV"));
     }
 }
 public ActionResult Edit([Bind(Include = "RECUMENT_ID,EMPLOYER_ID,EMPLOYEE_AMOUNT,JOB_ID,START_DATE,WORK_MONTH_AMOUNT,CREATED_DATE,APPROVAL_DEADLINE,REFERRAL_WAGE_COST,RECUMENT_STATUS")] JOB_RECUMENT jOB_RECUMENT)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jOB_RECUMENT).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JOB_ID      = new SelectList(db.JOBs, "JOB_ID", "JOB_CODE", jOB_RECUMENT.JOB_ID);
     ViewBag.EMPLOYER_ID = new SelectList(db.PROFILEs, "PROFILE_ID", "FIRST_NAME", jOB_RECUMENT.EMPLOYER_ID);
     return(View(jOB_RECUMENT));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "USER_ID,USERNAME,PASSWORD,USER_STATUS,ROLE_ID,JOINED_DATE,FACEBOOK_ID,GMAIL_ID,RESET_TOKEN")] USER uSER)
 {
     if (ModelState.IsValid)
     {
         db.Entry(uSER).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ROLE_ID = new SelectList(db.ROLEs, "ROLE_ID", "ROLE_NAME", uSER.ROLE_ID);
     return(View(uSER));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "PROFILE_ID,FIRST_NAME,LAST_NAME,IDENTITY_CARD,BIRTHDAY,SEX,EMAIL,PHONE,TOWN_ID,ADDRESS,AVATAR,DESCRIPTION")] PROFILE pROFILE)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pROFILE).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TOWN_ID = new SelectList(db.TOWNs, "TOWN_ID", "TOWN_NAME", pROFILE.TOWN_ID);
     return(View(pROFILE));
 }
 public ActionResult Edit([Bind(Include = "JOB_ID,CATEGORY_ID,JOB_CODE,JOB_NAME,MINIMUM_WAGE,MAXIMUM_WAGE,TOWN_ID,JOB_REQUIREMENT,JOB_DESCRIPTION,SHIFT_WORK")] JOB jOB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jOB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CATEGORY_ID = new SelectList(db.JOB_CATEGORY, "CATEGORY_ID", "CATEGORY_NAME", jOB.CATEGORY_ID);
     ViewBag.SHIFT_WORK  = new SelectList(db.SHIFT_WORK_SCHEDULE, "SHIFT_ID", "SHIFT_ID", jOB.SHIFT_WORK);
     ViewBag.PROVINCE_ID = new SelectList(db.PROVINCEs, "PROVINCE_ID", "PROVINCE_NAME", jOB.TOWN.PROVINCE_ID);
     ViewBag.TOWN_ID     = new SelectList(db.TOWNs, "TOWN_ID", "TOWN_NAME", jOB.TOWN_ID);
     return(View(jOB));
 }