Example #1
0
 private void BindDDL()
 {
     #region rebind DDL
     DDLTblCat.Items.Clear();
     DDLTblCat.AppendDataBoundItems = true;
     //String strConnString = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
     String        strQuery = "SELECT DISTINCT TABLE_DESC FROM MDM_DQI_PARAMETERS";
     OracleCommand objCmd   = new OracleCommand();
     con = new OracleConnection(new Connection().ConnectionString);
     objCmd.CommandType = CommandType.Text;
     objCmd.CommandText = strQuery;
     objCmd.Connection  = con;
     try
     {
         con.Open();
         DDLTblCat.DataSource     = objCmd.ExecuteReader();
         DDLTblCat.DataTextField  = "TABLE_DESC";
         DDLTblCat.DataValueField = "TABLE_DESC";
         DDLTblCat.DataBind();
         DDLTblCat.Items.Insert(0, new ListItem("--SELECT CATALOG--", ""));
     }
     catch (Exception ex)
     {
         ErrorSignal.FromCurrentContext().Raise(ex);
         //throw ex;
     }
     finally
     {
         con.Close();
         con.Dispose();
     }
     #endregion
 }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RadListBoxSource.SelectedIndexChanged += new EventHandler(RadListBoxSource_SelectedIndexChanged);
            RadListBoxSource.SelectedIndexChanged += new EventHandler(RadListBoxSource_SelectedIndexChanged);
            if (!IsPostBack)
            {
                DDLTblCat.AppendDataBoundItems = true;
                //String strConnString = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
                String        strQuery = "SELECT DISTINCT TABLE_DESC FROM MDM_DQI_PARAMETERS";
                OracleCommand objCmd   = new OracleCommand();
                con = new OracleConnection(new Connection().ConnectionString);
                objCmd.CommandType = CommandType.Text;
                objCmd.CommandText = strQuery;
                objCmd.Connection  = con;
                try
                {
                    con.Open();
                    DDLTblCat.DataSource     = objCmd.ExecuteReader();
                    DDLTblCat.DataTextField  = "TABLE_DESC";
                    DDLTblCat.DataValueField = "TABLE_DESC";
                    DDLTblCat.DataBind();
                    DDLTblCat.Items.Insert(0, new ListItem("--SELECT CATALOG--", ""));

                    this.btnUpdateDQIParam.Visible = false;
                    //this.GridView1.Visible = false;
                    this.GridView1.Visible = true;
                }
                catch (Exception ex)
                {
                    ErrorSignal.FromCurrentContext().Raise(ex);
                    //throw ex;
                }
                finally
                {
                    con.Close();
                    con.Dispose();
                }
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DDLTblCat.AppendDataBoundItems = true;
                //String strConnString = ConfigurationManager.ConnectionStrings["conString"].ConnectionString;
                String        strQuery = "select a.catalog_id, a.catalog_name, b.group_name from mdm_catalog a, MDM_DQ_CATALOG_GROUP b where a.category_id = b.group_id";
                OracleCommand objCmd   = new OracleCommand();
                con = new OracleConnection(new Connection().ConnectionString);
                objCmd.CommandType = CommandType.Text;
                objCmd.CommandText = strQuery;
                objCmd.Connection  = con;
                try
                {
                    con.Open();
                    DDLTblCat.DataSource     = objCmd.ExecuteReader();
                    DDLTblCat.DataTextField  = "catalog_name";
                    DDLTblCat.DataValueField = "catalog_id";
                    DDLTblCat.DataBind();
                    DDLTblCat.Items.Insert(0, new ListItem("--SELECT CATALOG--", ""));

                    this.btnUpdateDQIParam.Visible = false;
                    //this.GridView1.Visible = false;
                    this.GridView1.Visible = true;
                }
                catch (Exception ex)
                {
                    lblDQIParamMsg.Text = "Error Occured:" + ex.Message;
                }
                finally
                {
                    con.Close();
                    con.Dispose();
                }
                // BindPageGrid();
            }
        }