Example #1
0
    public void FriendRelativeSearch()
    {
        try
        {
            urUserRegBLLObj.usrAltMobileNo = Convert.ToString(Session["Mobile"]);

            urUserRegBLLObj.usrMobileNo = Convert.ToString(txtSearchFriRel.Text);
            DataTable dtUserList = urUserRegBLLObj.BLLFriendRelativeByMob(urUserRegBLLObj);

            urUserRegBLLObj.usrUserId         = Convert.ToString(Session["User"]);
            dtFriendGroup                     = urUserRegBLLObj.BLLShowAllFriendGroup(urUserRegBLLObj);
            gvFriendRelativeSearch.DataSource = dtUserList;
            gvFriendRelativeSearch.DataBind();
            txtSearchFriRel.Text = "";


            foreach (GridViewRow grdRow in gvFriendRelativeSearch.Rows)
            {
                string  sql = "select GroupNo from MiscalGroup";
                DataSet ds  = new DataSet();
                ds = cc.ExecuteDataset(sql);

                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    string   Gname = Convert.ToString(ds.Tables[0].Rows[0]["GroupNo"]);
                    string[] tmp   = Gname.Split(',');
                    //drdList.Items.Clear();
                    drdList = (DropDownList)(gvFriendRelativeSearch.Rows[grdRow.RowIndex].Cells[0].FindControl("cmbGroupType"));

                    foreach (string s in tmp)
                    {
                        drdList.Items.Add(s);
                        drdList.ID.Insert(0, s);
                    }
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }