Beispiel #1
0
        /// <summary>
        /// Bind Data to Drop Downs
        /// </summary>
        public void screenIntilation()
        {
            objUploadDocumentBLL = new UploadDocumentBLL();
            objUploadDocument    = new UploadDocumentBO();
            UploadDocumentList objUploadDocumentList = new UploadDocumentList();

            objUploadDocumentList = objUploadDocumentBLL.GetUploadDocument();

            ListItem lstItem = DocTypeDropDownList.Items[0];

            DocTypeDropDownList.Items.Clear();

            DocTypeDropDownList.DataSource     = objUploadDocumentList;//dt.Tables[0];
            DocTypeDropDownList.DataTextField  = "DocumentType";
            DocTypeDropDownList.DataValueField = "DocumentTypeID";
            DocTypeDropDownList.DataBind();
            DocTypeDropDownList.Items.Insert(0, lstItem);
        }
Beispiel #2
0
        /// <summary>
        /// Bind Data to Drop downs
        /// </summary>
        public void screenIntilation()
        {
            objUploadDocumentBLL = new UploadDocumentBLL();
            objUploadDocument    = new UploadDocumentBO();
            UploadDocumentList objUploadDocumentList = new UploadDocumentList();

            objUploadDocumentList = objUploadDocumentBLL.GetUploadDocument();

            DocTypeDropDownList.DataSource     = objUploadDocumentList;//dt.Tables[0];
            DocTypeDropDownList.DataTextField  = "DocumentType";
            DocTypeDropDownList.DataValueField = "DocumentTypeID";
            DocTypeDropDownList.DataBind();
            DocTypeDropDownList.Items.Insert(0, new ListItem("-- Select --", "0"));
            DocTypeDropDownList.SelectedIndex = 0;

            string DocumentCode = Request.QueryString["DOCUMENT_CODE"].ToString();

            DocTypeDropDownList.ClearSelection();
            if (DocumentCode.Length > 0)
            {
                for (int i = 0; i < objUploadDocumentList.Count; i++)
                {
                    if (DocumentCode == objUploadDocumentList[i].DocumentCode)
                    {
                        if (DocTypeDropDownList.Items.FindByValue(objUploadDocumentList[i].DocumentTypeID.ToString()) != null)
                        {
                            DocTypeDropDownList.Items.FindByValue(objUploadDocumentList[i].DocumentTypeID.ToString()).Selected = true;
                            DocTypeDropDownList.Enabled = false;
                        }
                        else
                        {
                            DocTypeDropDownList.Items[0].Selected = true;
                        }
                    }
                }
            }
            else
            {
                DocTypeDropDownList.Items[0].Selected = true;
            }
        }