You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.6 KiB

  1. using System.Web.UI.WebControls;
  2. namespace Swift.web.Library
  3. {
  4. public class StaticDataDdl : RemittanceLibrary
  5. {
  6. public void SetStaticDdl(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
  7. {
  8. SetStaticDdl(ref ddl, typeId, valueToBeSelected, label, "");
  9. }
  10. public void SetStaticDdl(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
  11. {
  12. SetDDL(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "valueId", "detailTitle", valueToBeSelected, label);
  13. }
  14. public void SetStaticDdl(ref DropDownList ddl, string typeId)
  15. {
  16. SetStaticDdl(ref ddl, typeId, "", "");
  17. }
  18. public void SetStaticDdl2(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
  19. {
  20. SetStaticDdl2(ref ddl, typeId, valueToBeSelected, label, "");
  21. }
  22. public void SetStaticDdl2(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
  23. {
  24. SetDDL2(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "detailTitle", valueToBeSelected, label);
  25. }
  26. public void SetStaticDdl2(ref DropDownList ddl, string typeId)
  27. {
  28. SetStaticDdl2(ref ddl, typeId, "", "");
  29. }
  30. public void SetStaticDdl3(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
  31. {
  32. SetStaticDdl3(ref ddl, typeId, valueToBeSelected, label, "");
  33. }
  34. public void SetStaticDdl3(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
  35. {
  36. SetDDL3(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "valueId", "detailTitle", valueToBeSelected, label);
  37. }
  38. public void SetStaticDdl3(ref DropDownList ddl, string typeId)
  39. {
  40. SetStaticDdl3(ref ddl, typeId, "", "");
  41. }
  42. public void SelectByTextDdl(ref DropDownList ddl, string text)
  43. {
  44. ListItem li = ddl.Items.FindByText(text);
  45. if (li != null)
  46. {
  47. li.Selected = true;
  48. }
  49. }
  50. public void SetStaticDdlTitle(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
  51. {
  52. SetDDL(ref ddl, "EXEC proc_staticDataValue 'c1'," + FilterString(typeId), "detailTitle", "detailDesc", valueToBeSelected, label);
  53. }
  54. }
  55. }