public async Task <JsonResult> AppSettings(SettingsVM model) { if (ModelState.IsValid) { CommonResponce result = null; string ActivityMsg = ""; if (model.Flag.Equals("GENERALSetting")) { result = await _AppSettingService.SaveGeneralSetting(model.AppGeneralSettings).ConfigureAwait(false); ActivityMsg = "Changed App Settings"; } else { result = await _AppSettingService.SaveMailSetting(model.MailSettings).ConfigureAwait(false); ActivityMsg = "Changed Email Settings"; } if (result.Stat) { await GetBaseService().AddActivity(ActivityType.Update, model.BUserID, model.BUserName, "Settings", ActivityMsg); return(Json(new { stat = true, msg = "Successfully Changed settings" })); } else { return(Json(new { stat = false, msg = result.StatusMsg })); } } else { return(Json(new { stat = false, msg = "Invalid application settings" })); } }