Exemplo n.º 1
0
        private void ShowUploadedDocuments()
        {
            DataSet dsGetAllDocuments;

            DisableLables();
            dsGetAllDocuments = dbDocumentStatusData.GetHODocFromSO(cmbVillage.SelectedValue.ToString(), cmbDocumentNo.SelectedValue.ToString(), "SO1");
            if (dsGetAllDocuments.Tables[0].Rows.Count > 0)
            {
                string strFamilyNo = dbFamilyDetailsData.getFamilyNoOnDocNo(cmbDocumentNo.SelectedValue.ToString().Trim());
                lblDocNo.Text  = cmbDocumentNo.SelectedValue.ToString();
                lblFamily.Text = strFamilyNo;

                //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();
                    string CreatedDate      = dsGetAllDocuments.Tables[0].Rows[i]["createddate"].ToString();
                    if (DocumentCode == "MSR")
                    {
                        btnLinkMSR.Text = UploadedDocument; lblDateMSR.Text = CreatedDate.ToString();
                    }
                    // if (DocumentCode == "RCMS") { btnLinkRCMS.Text = UploadedDocument; lblDateRCMS.Text = CreatedDate.ToString(); }
                    if (DocumentCode == "ODMS")
                    {
                        btnLinkODMS.Text = UploadedDocument; lblDateODMS.Text = CreatedDate.ToString();
                    }
                    //  if (DocumentCode == "CRS") { btnLinkCSR.Text = UploadedDocument; lblDateCRS.Text = CreatedDate.ToString(); }
                    if (DocumentCode == "RSR")
                    {
                        btnLinkRSR.Text = UploadedDocument; lblDateRSR.Text = CreatedDate.ToString();
                    }
                    // if (DocumentCode == "RCRS") { btnLinkRCRS.Text = UploadedDocument; lblDateRCRS.Text = CreatedDate.ToString(); }
                    if (DocumentCode == "LI")
                    {
                        btnLinkLI.Text = UploadedDocument; lblDateLI.Text = CreatedDate.ToString();
                    }
                    if (DocumentCode == "FT")
                    {
                        btnLinkFT.Text = UploadedDocument; lblDateFT.Text = CreatedDate.ToString();
                    }
                    //   if (DocumentCode == "CMS") { btnLinkChkList.Text = UploadedDocument; lblDateChkList.Text = CreatedDate.ToString(); }
                }
                //}
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Documents not uploaded');", true);
                DisableLables();
                //lblLinkGhoshanaPatra.Text = "";
                //lblLinkHamiPatra.Text = "";
                //lbllinkSaleDeed.Text = "";
                //lbllinkVisarPavti.Text = "";
                //lbllnkAgreementToSale.Text = "";
                //lbllnkPowerOfAttorney.Text = "";
                //lbllnkTabaPavti.Text = "";
            }
        }