private void ShowUploadedDocuments() { DataSet dsGetAllDocuments; dsGetAllDocuments = dbDocumentStatusData.GetDocumentexecutionHO(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString(), "HO"); if (dsGetAllDocuments.Tables[0].Rows.Count > 0) { //string UploadedDocument = dsGetAllDocuments.Tables[0].Rows[0]["documentname"].ToString(); //if(UploadedDocument != "") //{ for (int i = 0; i < dsGetAllDocuments.Tables[0].Rows.Count; i++) { string UploadedDocument = dsGetAllDocuments.Tables[0].Rows[i]["documentname"].ToString(); string DocumentCode = dsGetAllDocuments.Tables[0].Rows[i]["documentcode"].ToString(); if (DocumentCode == "VP") { lbllinkVisarPavti.Text = UploadedDocument; } if (DocumentCode == "ATS") { lbllnkAgreementToSale.Text = UploadedDocument; } if (DocumentCode == "SD") { lbllinkSaleDeed.Text = UploadedDocument; } if (DocumentCode == "GPA") { lbllnkPowerOfAttorney.Text = UploadedDocument; } if (DocumentCode == "TP") { lbllnkTabaPavti.Text = UploadedDocument; } if (DocumentCode == "GP") { lblLinkGhoshanaPatra.Text = UploadedDocument; } if (DocumentCode == "HP") { lblLinkHamiPatra.Text = UploadedDocument; } } //} } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Documents not uploaded');", true); lblLinkGhoshanaPatra.Text = ""; lblLinkHamiPatra.Text = ""; lbllinkSaleDeed.Text = ""; lbllinkVisarPavti.Text = ""; lbllnkAgreementToSale.Text = ""; lbllnkPowerOfAttorney.Text = ""; lbllnkTabaPavti.Text = ""; lblLinkPN.Text = ""; } }