public ActionResult User(tblCustomerDetails customerdetail)
        {
            try
            {
                BLManageUser customerBL = new BLManageUser();
                customerBL.SetUsers(customerdetail);
                SessionHelper.UserSession.Name = customerdetail.CustomerName;
            }
            catch
            {
                ModelState.AddModelError("", "Error occurred while updating profile update.");
                return Json(new { errors = KeyValue.GetErrorsFromModelState(ViewData) });
            }

            UrlHelper u = new UrlHelper(HttpContext.Request.RequestContext);
            string url = u.Action("Index", "Search", null);

            return Json(new { success = true, redirect = url });
        }
        public ActionResult User(tblCustomerDetails customerdetail)
        {
            try
            {
                string submitButtonID = Request["SubmitButtonID"].ToString();
                BLManageUser customerBL = new BLManageUser();
                customerBL.SetUsers(customerdetail);
                if (submitButtonID == "SbmtEmail")
                    Common.SendMail(customerdetail.EmailAddress, "Please login in flexis system with below credentials", "User Name: " + customerdetail.EmailAddress + ", " + "Password: "******"", "Error occurred durung Customer Information save.");
                return Json(new { errors = KeyValue.GetErrorsFromModelState(ViewData) });
            }

            return Json(new { success = true, CustomerID = SessionHelper.UserSession.CustomerID, Tab = "CI" });
        }