예제 #1
0
    private void BindMembers(int distID)
    {
        DBconnection obj = new DBconnection();

        //int distID = int.Parse(Session["DistrictClubID"].ToString());
        //obj.SetCommandQry = "select sr, (fname+' ' + lname) as name from member where Status='True' order by name asc";
        obj.SetCommandQry = "select MemberId, (fname+' ' + lname) as name from district3140_members_tbl where DistrictClubID='" + distID + "' and Status='True' order by name asc";

        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();

        DDLMember.DataTextField  = "name";
        DDLMember.DataValueField = "MemberId";

        DDLMember.DataSource = dt;
        DDLMember.DataBind();

        // DDLMember.Items.Insert(0, "Select");


        DDLMember0.DataTextField  = "name";
        DDLMember0.DataValueField = "MemberId";

        DDLMember0.DataSource = dt;
        DDLMember0.DataBind();

        //DDLMember0.Items.Insert(0, "Select");
    }
예제 #2
0
 private void clear()
 {
     trPresi.Visible       = false;
     trSec.Visible         = false;
     chkIfOtherSec.Checked = false;
     chkIfOther.Checked    = false;
     DDLYear.ClearSelection();
     DDLMember.ClearSelection();
     DDLMember0.ClearSelection();
     DDLClubName.ClearSelection();
 }
    private void BindMembers(int clubId)
    {
        DBconnection obj = new DBconnection();

        //int distID = int.Parse(DDLClubName.SelectedValue.ToString());
        //obj.SetCommandQry = "select sr, (fname+' ' + lname) as name from member where Status='True' order by name asc";
        obj.SetCommandQry = "select MemberId, (fname+' ' + lname) as name from ViewMembers where DistrictClubID='" + clubId + "' and Status='True' order by name asc";

        DataTable dt = new DataTable();

        dt = obj.ExecuteTable();

        DDLMember.DataTextField  = "name";
        DDLMember.DataValueField = "MemberId";

        DDLMember.DataSource = dt;
        DDLMember.DataBind();

        DDLMember.Items.Insert(0, "Select");
    }
예제 #4
0
    private void BindMembers(int distID)
    {
        // int distID = int.Parse(Session["DistrictClubID"].ToString());
        MembersBll obj = new MembersBll();

        obj.ClubId = distID;
        DataTable dt = new DataTable();

        dt = obj.GetMemberByClubId();
        if (dt.Rows.Count > 0)
        {
            DDLMember.DataTextField  = "name";
            DDLMember.DataValueField = "MemberId";

            DDLMember.DataSource = dt;
            DDLMember.DataBind();

            //DDLMember.Items.Insert(0, "Select");
        }
        else
        {
            DDLMember.ClearSelection();
        }
    }