Пример #1
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            CustomerType oCustomerType = new CustomerType();
            Result       oResult       = new Result();

            if (Type.Equals("BankSearch"))
            {
                BankDAL oBDAL = new BankDAL();
                oResult = oBDAL.AppSearchList(txtID.Text, txtName.Text);
            }
            else if (Type.Equals("DivisionSearch"))
            {
                DivisionDAL oDivisionDAL = new DivisionDAL();
                oResult = oDivisionDAL.AppSearchList(txtID.Text, txtName.Text);
            }
            else if (Type.Equals("CurrencySearch"))
            {
                CurrencyDAL oCurrencyDAL = new CurrencyDAL();
                oResult = oCurrencyDAL.AppSearchList(txtID.Text, txtName.Text);
            }
            else if (Type.Equals("BranchSearch"))
            {
                BranchDAL oBranchDAL = new BranchDAL();
                oResult = oBranchDAL.AppSearchList(txtID.Text, txtName.Text);
            }

            ScriptManager.RegisterStartupScript(this.upGv, typeof(string), Constants.POPUP_WINDOW, " HideProgressStatus('ctl00_cphDet_ucSearchConfComm_lblProgress') ", true);
            if (oResult.Status)
            {
                DataTable dtTmpCustomerTypeList = (DataTable)oResult.Return;
                if (dtTmpCustomerTypeList.Rows.Count > 0)
                {
                    gvSearchList.DataSource = dtTmpCustomerTypeList;
                    gvSearchList.DataBind();
                }
                else
                {
                    gvSearchList.DataSource = null;
                    gvSearchList.DataBind();
                }
                Session[Constants.SES_CONFIG_APPROVE_DATA] = dtTmpCustomerTypeList;
            }

            ScriptManager.RegisterStartupScript(this.upGv, typeof(string), Constants.POPUP_WINDOW, " HideProgressStatus('ctl00_cphDet_ucSearchConfComm_lblProgress') ", true);
        }