Ejemplo n.º 1
0
    public string GetFenZhanName(string Id)
    {
        if (Id == "0")
        {
            return("所有分站");
        }
        string     FenZhanName = "";
        FenZhanBLL bll         = new FenZhanBLL();
        DataTable  dt          = bll.GetFenZhanById(Id);

        if (dt != null && dt.Rows.Count > 0)
        {
            FenZhanName = dt.Rows[0]["FenZhanName"].ToString();
        }
        return(FenZhanName);
    }
Ejemplo n.º 2
0
    public void InitFenZhan()
    {
        FenZhanBLL bll = new FenZhanBLL();
        DataTable  dt  = bll.GetFenZhanList();

        if (dt != null && dt.Rows.Count > 0)
        {
            FenZhanList.DataSource     = dt;
            FenZhanList.DataValueField = "ProvinceID";
            FenZhanList.DataTextField  = "FenZhanName";
            FenZhanList.DataBind();
        }

        ListItem item = new ListItem();

        item.Value = "0";
        item.Text  = "所有分站";
        FenZhanList.Items.Insert(0, item);
    }