/// <summary> /// Reset session data /// </summary> /// <returns></returns> public ActionResult ResetSessionData() { ObjectResultData res = new ObjectResultData(); try { ScreenParameter param = GetScreenObject <object>() as ScreenParameter; if (param != null) { ScreenParameter nparam = ScreenParameter.ResetScreenParameter(param); if (nparam != null) { UpdateScreenObject(nparam); } } res.ResultData = true; } catch (Exception ex) { res.AddErrorMessage(ex); } return(Json(res)); }
/// <summary> /// Reset screen parameter. /// </summary> /// <returns></returns> public ActionResult IVS250_resetParam() { ObjectResultData res = new ObjectResultData(); try { IVS250_ScreenParameter prm = GetScreenObject <IVS250_ScreenParameter>(); IVS250_ScreenParameter nprm = (IVS250_ScreenParameter)ScreenParameter.ResetScreenParameter(prm); UpdateScreenObject(nprm); res.ResultData = true; //ScreenParameter param = GetScreenObject<object>() as ScreenParameter; //if (param != null) //{ // ScreenParameter nparam = ScreenParameter.ResetScreenParameter(param); // if (nparam != null) // { // nparam.IsLoaded = false; // UpdateScreenObject(nparam); // } //} return(Json(res)); } catch (Exception ex) { res.AddErrorMessage(ex); return(Json(res)); } }
/// <summary> /// Change current language and reload screen with selected language. /// </summary> /// <param name="lang"></param> /// <returns></returns> public void changeLanguageDsTransData(string lang) { try { if (!CommonUtil.IsNullOrEmpty(lang)) { dsTransDataModel dstrans = CommonUtil.dsTransData; lang = lang.ToLower(); if (lang == CommonValue.DEFAULT_SHORT_LANGUAGE_EN) { dstrans.dtTransHeader.Language = CommonValue.DEFAULT_LANGUAGE_EN; } else if (lang == CommonValue.DEFAULT_SHORT_LANGUAGE_JP) { dstrans.dtTransHeader.Language = CommonValue.DEFAULT_LANGUAGE_JP; } else { dstrans.dtTransHeader.Language = CommonValue.DEFAULT_LANGUAGE_LC; } //Update Language CommonUtil.MappingObjectLanguage <OfficeDataDo>(dstrans.dtOfficeData); CommonUtil.dsTransData = dstrans; //Update Language for menu list CommonUtil.MappingObjectLanguage <MenuName>(CommonUtil.MenuNameList); Session.Remove("Menu"); ScreenParameter param = GetScreenObject <object>() as ScreenParameter; if (param != null) { ScreenParameter nparam = ScreenParameter.ResetScreenParameter(param); if (nparam != null) { nparam.IsLoaded = false; nparam.BackStep = true; UpdateScreenObject(nparam); } } } } catch (Exception) { } }