Esempio 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);
    }
    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);
    }