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.
 
 
 
 
 

58 lines
2.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
namespace JMEAgentSystem.Library
{
public class StaticDataDdl : SwiftLibrary
{
public void SetStaticDdl(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
{
SetStaticDdl(ref ddl, typeId, valueToBeSelected, label, "");
}
public void SetStaticDdl(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
{
SetDDL(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "valueId", "detailTitle", valueToBeSelected, label);
}
public void SetStaticDdl(ref DropDownList ddl, string typeId)
{
SetStaticDdl(ref ddl, typeId, "", "");
}
public void SetStaticDdl2(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
{
SetStaticDdl2(ref ddl, typeId, valueToBeSelected, label, "");
}
public void SetStaticDdl2(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
{
SetDDL2(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "detailTitle", valueToBeSelected, label);
}
public void SetStaticDdl2(ref DropDownList ddl, string typeId)
{
SetStaticDdl2(ref ddl, typeId, "", "");
}
public void SetStaticDdl3(ref DropDownList ddl, string typeId, string valueToBeSelected, string label)
{
SetStaticDdl3(ref ddl, typeId, valueToBeSelected, label, "");
}
public void SetStaticDdl3(ref DropDownList ddl, string typeId, string valueToBeSelected, string label, string valueId)
{
SetDDL3(ref ddl, "EXEC proc_staticDataValue 'c'," + FilterString(typeId) + ",@valueId = " + FilterString(valueId), "valueId", "detailTitle", valueToBeSelected, label);
}
public void SetStaticDdl3(ref DropDownList ddl, string typeId)
{
SetStaticDdl3(ref ddl, typeId, "", "");
}
public void SelectByTextDdl(ref DropDownList ddl, string text)
{
ListItem li = ddl.Items.FindByText(text);
if (li != null)
{
li.Selected = true;
}
}
}
}