コード例 #1
0
        private void FillCategoryEntity()
        {
            string strSql = "";

            strSql = "SELECT oce_id as ID,replace(convert(char(20),ltrim(OCE_DESCRIPTION  ))+oce_id,' ',' ' ) as NAME FROM ent_org_common_entities where cem_entity_id='CAT' and  oce_isdeleted='0'";

            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, con);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstCategory.DataValueField = "ID";
            LstCategory.DataTextField  = "NAME";

            LstCategory.DataSource = thisDataSet.Tables[0];

            LstCategory.DataBind();


            LstCategoryDummy.DataValueField = "ID";
            LstCategoryDummy.DataTextField  = "NAME";
            LstCategoryDummy.DataSource     = thisDataSet.Tables[0];
            LstCategoryDummy.DataBind();
        }
コード例 #2
0
        private void FillCategoryEntity()
        {
            string strSql = "";

            strSql = "SELECT oce_id AS ID,replace(convert(char(24),ltrim(OCE_DESCRIPTION  )) + oce_id,' ',' ' ) as NAME FROM ent_org_common_entities where cem_entity_id='CAT' and  oce_isdeleted='0' order by ID";
            // strSql = "SELECT cat_category_id as ID,replace(convert(char(20),ltrim(cat_category_description  ))+cat_category_id,' ',' ' ) as NAME FROM ENT_CATEGORY where   cat_isdeleted='0'";

            if (conn.State == ConnectionState.Closed)
            {
                conn.Open();
            }
            // conn.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, conn);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstCategory.DataValueField = "ID";
            LstCategory.DataTextField  = "NAME";

            LstCategory.DataSource = thisDataSet.Tables[0];

            LstCategory.DataBind();
            if (conn.State == ConnectionState.Open)
            {
                conn.Close();
            }
        }
コード例 #3
0
        private void FillCategoryEntity()
        {
            string strSql = "";

            strSql = " SELECT OCE_ID as ID,replace(convert(char(20),ltrim(OCE_DESCRIPTION  ))+OCE_ID,' ',' ' ) as NAME FROM ENT_ORG_COMMON_ENTITIES WHERE CEM_ENTITY_ID='CAT' AND  OCE_ISDELETED='0' ";
            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, con);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstCategory.DataValueField = "ID";
            LstCategory.DataTextField  = "NAME";

            LstCategory.DataSource = thisDataSet.Tables[0];

            LstCategory.DataBind();
        }
コード例 #4
0
        private void FillCategoryEntity()
        {
            string strSql = "";

            strSql = "select OCE_ID AS ID,OCE_DESCRIPTION  as NAME from ENT_ORG_COMMON_ENTITIES where OCE_ISDELETED='0' AND CEM_ENTITY_ID='CAT'";

            SqlConnection con = new SqlConnection(m_connections);

            con.Open();
            SqlCommand     cmd         = new SqlCommand(strSql, con);
            SqlDataAdapter adpt        = new SqlDataAdapter(cmd);
            DataSet        thisDataSet = new DataSet();

            adpt.Fill(thisDataSet);

            LstCategory.DataValueField = "ID";
            LstCategory.DataTextField  = "NAME";

            LstCategory.DataSource = thisDataSet.Tables[0];

            LstCategory.DataBind();
        }