protected void Btn1_GetAnnouncement(object sender, EventArgs e) { var pf = platform1.Text; if (string.IsNullOrEmpty(pf)) { pf = "all"; } try { var Response = reader.GetPlatformAnnouncement(pf); if (Response != null) { var list = Response.Data.AnnouncementList; if (list != null && list.Count > 0) { datagrid.DataSource = list; datagrid.DataBind(); ClearData(); } } } catch (Exception ex) { ShowMessage(ex.Message); } }