Re: Obsolete methods

  •  07-26-2012, 11:23 AM

    Re: Obsolete methods

    Hello,
     
    I am having the same issue in several locations, this code does not look like it will replace the code for the createLobby or updateLobby codes.
     

    private

     

     

    void DataGrid1_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)

    {

     

    string userid=(string)DataGrid1.DataKeys[e.Item.ItemIndex];

     

    StringBuilder sb=new StringBuilder();

     

    foreach(string eachuserid in Lobby.ManagerList.Split(','))

    {

     

    if(eachuserid.Length==0)continue;

     

    if(string.Compare(userid,eachuserid,true)!=0)

    {

     

    if(sb.Length!=0)sb.Append(",");

    sb.Append(eachuserid);

    }

    }

    Lobby.ManagerList=sb.ToString();

     

    ChatApi.UpdateLobby(Lobby);

    BindDataGrid();

    }

View Complete Thread