예제 #1
0
    private void DataListZCDCTypeBindData()
    {
        DataTable dt = new DAL.Tables.T_FootballLeagueTypes().Open("", "", "");

        if (dt == null)
        {
            PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "Admin_FootballLeagueTypes");

            return;
        }

        DataListZCDCType.DataSource = dt;
        DataListZCDCType.DataBind();
    }
예제 #2
0
    protected void UPlLeague(DataTable table)
    {
        string League = string.Empty;

        DAL.Tables.T_FootballLeagueTypes T_FootballLeagueTypes = new DAL.Tables.T_FootballLeagueTypes();

        foreach (DataRow row in table.Rows)
        {
            if (League == row["League"].ToString())
            {
                continue;
            }
            League = row["League"].ToString();
            if (T_FootballLeagueTypes.GetCount("name='" + League + "'") == 0)
            {
                T_FootballLeagueTypes.Name.Value         = League;
                T_FootballLeagueTypes.MarkersColor.Value = row["Color"].ToString();

                T_FootballLeagueTypes.Insert();
            }
        }
    }