namespace CDR.components
{
 /// <summary>
 /// CallerType 的摘要说明。
 /// </summary>
 public enum CallerType
 {
  Call = 1,
  Relay,
  SoftSwitch
 }

 public class CallerTypes
 {
  public static HybridDictionary types = new  HybridDictionary();
  
  static CallerTypes()
  {
   types[CallerType.Call] = "主叫";
   types[CallerType.Relay] = "中继";
   types[CallerType.SoftSwitch] = "软交换";
  }

  public static HybridDictionary Types
  {
   get{return types;}
  }
 }
}

  private void Page_Load(object sender, System.EventArgs e)
  {
   // 在此处放置用户代码以初始化页面
   if(!IsPostBack)
   {
    BindCallerType(txtCallerTypeID);
   }
  }

  private void BindCallerType(DropDownList ddl)
  {
   try
   {
    ddl.Items.Clear();
    ddl.DataSource = CallerTypes.types.Values;
    ddl.DataBind();
   }
   catch
   {}
  }

相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-01-21
  • 2021-04-17
  • 2022-02-04
  • 2021-07-28
猜你喜欢
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2021-11-19
  • 2021-08-17
  • 2021-06-13
相关资源
相似解决方案