Esempio n. 1
0
    private void BindDocument(int DocId)
    {
        try
        {
            ds = _objDocumentBL.GetDocumentById(DocId, Session["SAID"].ToString());
            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                hfDocID.Value = ds.Tables[0].Rows[0]["DocId"].ToString();
                if (ds.Tables[0].Rows[0]["SAID"].ToString() == "0")
                {
                    txtSAID.Text = ds.Tables[0].Rows[0]["UIC"].ToString();
                }
                else
                {
                    txtSAID.Text = ds.Tables[0].Rows[0]["SAID"].ToString();
                }
                //ddlDocType.SelectedIndex = ddlDocType.Items.IndexOf(ddlDocType.Items.FindByValue(ds.Tables[0].Rows[0]["DocType"].ToString()));
                txtDocumentType.Text = allDocType[ds.Tables[0].Rows[0]["DocType"].ToString()];
                lblFileName.Text     = ds.Tables[0].Rows[0]["DocumentName"].ToString();
                hfDocumentName.Value = ds.Tables[0].Rows[0]["Document"].ToString();

                fuDoc.AllowMultiple = false;
            }
        }
        catch
        {
            lblTitle.Text      = "Warning!";
            lblTitle.ForeColor = System.Drawing.Color.Red;
            message.ForeColor  = System.Drawing.Color.Red;
            message.Text       = "Sorry,Something went wrong, please contact administrator";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
        }
    }