private void ShowPTS() { lbllinkPN.Text = ""; dsGetPublicNotice = dbDocumentStatusData.GetPTSForSite1(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString(), "SO1"); if (dsGetPublicNotice.Tables[0].Rows.Count > 0) { string UploadedDocument = dsGetPublicNotice.Tables[0].Rows[0]["documentname"].ToString(); string DocumentCode = dsGetPublicNotice.Tables[0].Rows[0]["documentcode"].ToString(); if (DocumentCode == "PTS") { lbllnkTS.Text = UploadedDocument; } } }