_MailNotificationPluginJobsPartial.cshtml 1.4 KB

12345678910111213141516171819202122232425262728
  1. @model GreenTree.Nachtragsmanagement.Web.Models.Misc.MailNotificationDataModel
  2. @if (Model == null || (Model != null && Model.NotificationPlugin == null))
  3. {
  4. @Html.DevExpress().ComboBoxFor(m => m.NotificationJobSystemName, t =>
  5. {
  6. t.Width = new Unit(100, UnitType.Percentage);
  7. t.Properties.ValueField = "SystemName";
  8. t.Properties.ValueType = typeof(string);
  9. t.Properties.TextField = "Name";
  10. t.CallbackRouteValues = new { Controller = "Misc", Action = "PartialNotificationPluginJobs" };
  11. t.Properties.ClientSideEvents.BeginCallback = "function (s, e) { e.customArgs['pluginSystemName'] = [ pluginSystemName ]; }";
  12. t.Properties.ClientSideEvents.SelectedIndexChanged = "function (s, e) { onNotificationJobSelectedIndexChanged(); }";
  13. }).GetHtml()
  14. }
  15. else
  16. {
  17. @Html.DevExpress().ComboBoxFor(m => m.NotificationJobSystemName, t =>
  18. {
  19. t.Width = new Unit(100, UnitType.Percentage);
  20. t.Properties.ValueField = "SystemName";
  21. t.Properties.ValueType = typeof(string);
  22. t.Properties.TextField = "Name";
  23. t.CallbackRouteValues = new { Controller = "Misc", Action = "PartialNotificationPluginJobs" };
  24. t.Properties.ClientSideEvents.BeginCallback = "function (s, e) { e.customArgs['pluginSystemName'] = [ pluginSystemName ]; }";
  25. t.Properties.ClientSideEvents.SelectedIndexChanged = "function (s, e) { onNotificationJobSelectedIndexChanged(); }";
  26. }).BindList(Model.NotificationPlugin.AvailableNotificationJobs).Bind(Model.NotificationJobSystemName).GetHtml()
  27. }