public ActionResult Create([Bind(Include = "TenantEmailConfigId,SmtpHost,SmtpPort,UserEmail,Password,EnableSsl,IsActive,DailyEmailDispatchTime,EnableRelayEmailServer,TenantId,DateCreated,DateUpdated,CreatedBy,UpdatedBy,IsDeleted")] TenantEmailConfig tenantEmailConfig) { if (ModelState.IsValid) { _tenantEmailConfigServices.SaveEmailConfig(tenantEmailConfig, caCurrent.CurrentUser().UserId, caCurrent.CurrentTenant().TenantId); return(RedirectToAction("Index")); } return(View(tenantEmailConfig)); }
public ActionResult Create([Bind(Include = "TenantEmailConfigId,TenantId,SmtpHost,SmtpPort,UserEmail,Password,EnableSsl,DateUpdated,UpdatedBy,IsActive")] TenantEmailConfig tenantemailconfig) { if (ModelState.IsValid) { // get properties of tenant caTenant tenant = caCurrent.CurrentTenant(); // get properties of user caUser user = caCurrent.CurrentUser(); _tenantEmailConfigService.SaveEmailConfig(tenantemailconfig, user.UserId, tenant.TenantId); return(RedirectToAction("Index")); } return(View(tenantemailconfig)); }