Exemplo n.º 1
0
    void GetCommodity()
    {
        comdtobj = new Commodity_MP(ComObj);
        DataSet ds = comdtobj.selectAll(" order by Commodity_Name  desc");

        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
Exemplo n.º 2
0
    void GetCommodity()
    {
        comdtobj = new Commodity_MP(ComObj);
        DataSet ds = comdtobj.selectAll(" order by Commodity_Name  desc");

        ddlcomdty.DataSource     = ds.Tables[0];
        ddlcomdty.DataTextField  = "Commodity_Name";
        ddlcomdty.DataValueField = "Commodity_Id";
        ddlcomdty.DataBind();
        // ddlcomdty.Items.Insert(0, "--Select--");
    }
Exemplo n.º 3
0
    void GetCommodity()
    {
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }

        comdtobj = new Commodity_MP(ComObj);
        DataSet ds = comdtobj.selectAll(" order by Commodity_Name  desc");

        ddlcomdty.DataSource     = ds.Tables[0];
        ddlcomdty.DataTextField  = "Commodity_Name";
        ddlcomdty.DataValueField = "Commodity_Id";
        ddlcomdty.DataBind();
        ddlcomdty.Items.Insert(0, "--Select--");

        if (con.State == ConnectionState.Open)
        {
            con.Close();
        }
    }