Exemplo n.º 1
0
        public ActionResult EditEmployerContact(EmployerContacts contact, String EmployerId)
        {
            string LoginUser = (string)Session["LoginSAPID"];
            string userkey   = ConfigurationManager.AppSettings["userkey"];
            string uid       = ConfigurationManager.AppSettings["uid"];

            try
            {
                Employer.Employer employer = new Employer.Employer();
                var createEmContact        = employer.ModifyExternalUser(contact.EmployerID, "", contact.Email, contact.Fullname, contact.PhoneNo, LoginUser, contact.Role, contact.ID, userkey, uid);
                var createStatus           = createEmContact.Split('~');

                if (createStatus[0] != "01")
                {
                    TempData["Msg"]  = createStatus[1];
                    ViewBag.sMessage = TempData["Msg"];
                    return(RedirectToAction("Index"));
                    //return View();
                }
                else
                {
                    TempData["error"] = createStatus[1];
                    ViewBag.Error     = TempData["error"];
                    return(View());
                }
            }
            catch (Exception ex)
            {
                LogError logerror = new LogError();
                logerror.ErrorLog("", LoginUser, "", "Admin/CreateRole", "Admin", "CreateRole", "CreateRole Error", ex.Message.ToString(), 0);
                TempData["error"] = ex.Message.ToString();
                ViewBag.Error     = TempData["error"];
                return(View());
            }
        }