public ActionResult Create([Bind(Include = "TenantConfigId,AlertMinimumProductPrice,EnforceMinimumProductPrice,AlertMinimumPriceMessage,EnforceMinimumPriceMessage,PoReportFooterMsg1,PoReportFooterMsg2,SoReportFooterMsg1,SoReportFooterMsg2,DnReportFooterMsg1,DnReportFooterMsg2,WorksOrderScheduleByMarginHours,WorksOrderScheduleByAmPm,EnableLiveEmails,MiniProfilerEnabled,EnabledRelayEmailServer,EnablePalletingOnPick,WarehouseLogEmailsToDefault,WarehouseScheduleStartTime,WarehouseScheduleEndTime,ErrorLogsForwardEmails,DefaultReplyToAddress,DefaultMailFromText,AutoTransferStockEnabled,EnableStockVarianceAlerts,AuthorisationAdminEmail,DefaultCashAccountID,TenantReceiptPrintHeaderLine1,TenantReceiptPrintHeaderLine2,TenantReceiptPrintHeaderLine3,TenantReceiptPrintHeaderLine4,TenantLogo,PrintLogoForReceipts,SessionTimeoutHours,TenantId,DateCreated,DateUpdated,CreatedBy,UpdatedBy,IsDeleted")] TenantConfig tenantConfig) { if (ModelState.IsValid) { if (tenantConfig.TenantConfigId > 0) { tenantConfig.TenantId = CurrentTenantId; tenantConfig.DateUpdated = DateTime.UtcNow; tenantConfig.UpdatedBy = CurrentUserId; _tenantsServices.UpdateTenantConfig(tenantConfig); } else { tenantConfig.TenantId = CurrentTenantId; tenantConfig.DateCreated = DateTime.UtcNow; tenantConfig.CreatedBy = CurrentUserId; _tenantsServices.AddTenantConfig(tenantConfig); } return(RedirectToAction("Index")); } ViewBag.DefaultCashAccountID = new SelectList(_accountServices.GetAllValidAccounts(CurrentTenantId).ToList(), "AccountID", "AccountCode", tenantConfig.DefaultCashAccountID); ViewBag.TenantId = new SelectList(_tenantsServices.GetAllTenants(), "TenantId", "TenantName"); return(View(tenantConfig)); }