PageRenderTime 48ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/DesktopModules/AgapeUK/QuickRender/Settings.ascx.cs

https://github.com/mailekah/AgapeConnect1
C# | 40 lines | 39 code | 1 blank | 0 comment | 2 complexity | e2172e80503e923fd4a55245d91bca61 MD5 | raw file
Possible License(s): BSD-3-Clause, Apache-2.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using DotNetNuke;
  8. namespace DotNetNuke.Modules.AgapeUK.QuickRender
  9. {
  10. public partial class Settings : DotNetNuke.Entities.Modules.ModuleSettingsBase
  11. {
  12. public override void LoadSettings()
  13. {
  14. base.LoadSettings();
  15. string thisText = "";
  16. try
  17. {
  18. thisText = TabModuleSettings["ThisText"] as string;
  19. }
  20. catch (Exception e)
  21. {
  22. thisText = "";
  23. }
  24. tbContent.Text = thisText;
  25. }
  26. public override void UpdateSettings()
  27. {
  28. base.UpdateSettings();
  29. string newText = "";
  30. newText = tbContent.Text as string;
  31. if (!(newText == ""))
  32. {
  33. DotNetNuke.Entities.Modules.ModuleController objModules = new DotNetNuke.Entities.Modules.ModuleController();
  34. objModules.UpdateTabModuleSetting(TabModuleId,"ThisText",newText);
  35. SynchronizeModule();
  36. }
  37. }
  38. }
  39. }