Beispiel #1
0
        public ActionResult changePassword(string OldPassword, string NewPassword, int Operation)
        {
            Dictionary <string, string> outData = new Dictionary <string, string>();

            NuPortalDBService.NuPortalService dbservice = new NuPortalDBService.NuPortalService();
            dbservice.Url = Constants.DBService;
            try
            {
                string JsonString = dbservice.ChangePassword(OldPassword, NewPassword, Convert.ToInt32(Session["EmpId"]), Operation);
                if (JsonString != string.Empty)
                {
                    return(Json(JsonString));
                }
            }
            catch (Exception ex)
            {
                GeneralFunctions genFun = new GeneralFunctions();
                genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name,
                                Convert.ToString(ControllerContext.RouteData.Values["action"]),
                                Convert.ToString(ControllerContext.RouteData.Values["controller"]));
                genFun = null;
                return(Json("{\"Result\":\"" + ex.Message + "\"}"));
            }
            finally
            {
                dbservice = null;
            }
            return(Json(Common_Library.Constants.JsonError));
        }