コード例 #1
0
ファイル: frmLogin.aspx.cs プロジェクト: Shivani161992/CSMS
    private void GetDist()
    {
        try
        {
            sqlObj = new SqlString(ComObj);

            string qrySelect = "SELECT * FROM DistrictMaster order by DistrictName";

            DataSet ds = sqlObj.selectAny(qrySelect);
            if (ds == null)
            {
            }
            else
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DDL_Dist.DataSource     = ds.Tables[0];
                    DDL_Dist.DataValueField = "DistrictCode";
                    DDL_Dist.DataTextField  = "DistrictName";
                    DDL_Dist.DataBind();
                    DDL_Dist.Items.Insert(0, "--Select--");
                }
            }
        }

        catch (Exception ex)
        {
            Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('" + ex.Message + "'); </script> ");
        }
    }
コード例 #2
0
    private void GetDist()
    {
        try
        {
            distObj = new Districts(ComObj);
            DataSet ds = distObj.selectmp(dist);

            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DDL_Dist.DataSource     = ds.Tables[0];
                    DDL_Dist.DataTextField  = "DistrictName";
                    DDL_Dist.DataValueField = "DistrictCode";
                    DDL_Dist.DataBind();

                    DDL_Dist.Enabled = false;
                }
            }
        }
        catch (Exception ex)
        {
            Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('" + ex.Message + "'); </script> ");
        }
    }
コード例 #3
0
    private void GetDistLRMP()
    {
        try
        {
            SqlObj = new SqlString(ComObj);
            string  strSql = "select * from LR_DistrictMaster where Distno in(select  DistNo_LRMP from DistrictMaster where DistrictCode= '" + dist + "')";
            DataSet ds     = SqlObj.selectAny(strSql);
            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DDL_Dist.DataSource     = ds.Tables[0];
                    DDL_Dist.DataTextField  = "Distname";
                    DDL_Dist.DataValueField = "Distno";
                    DDL_Dist.DataBind();


                    DDL_Dist.Enabled = false;

                    //for ddl_DistPrc
                    ddl_DistPrc.DataSource     = ds.Tables[0];
                    ddl_DistPrc.DataTextField  = "Distname";
                    ddl_DistPrc.DataValueField = "Distno";
                    ddl_DistPrc.DataBind();

                    ddl_DistPrc.Enabled = false;
                }
            }
        }
        catch (Exception ex)
        {
            Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('" + ex.Message + "'); </script> ");
        }
    }
コード例 #4
0
    private void GetDist()
    {
        distObj = new Districts(ComObj);
        DataSet ds = distObj.selectmp(dist);

        if (ds != null)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                DDL_Dist.DataSource     = ds.Tables[0];
                DDL_Dist.DataTextField  = "DistrictName";
                DDL_Dist.DataValueField = "DistrictCode";
                DDL_Dist.DataBind();

                DDL_Dist.Enabled = false;
            }
        }
    }
コード例 #5
0
    private void getDistrcts()
    {
        Dobj = new Districts(ComObj);

        string qrySelect = "SELECT * FROM DistrictMaster order by DistrictName";

        DataSet ds = Dobj.selectAny(qrySelect);

        if (ds == null)
        {
        }
        else
        {
            DDL_Dist.DataSource     = ds.Tables[0];
            DDL_Dist.DataValueField = "DistrictCode";
            DDL_Dist.DataTextField  = "DistrictName";
            DDL_Dist.DataBind();
            DDL_Dist.Items.Insert(0, "--Select--");
        }
    }