//public string Keyword { get { return txtSearch.Text; } set { txtSearch.Text = value; } }
        #endregion

        public void BindData(BindType bindType)
        {
            var queryArgument = new QueryArgument(UserContext.DataBaseInfo)
            {
                FilterKey = UserCode.ToString(),
                BindType  = bindType,
                //Keyword = Keyword
            };
            var userProfiles = _controlPanel.GetUserProfiles(queryArgument);

            if (userProfiles != null)
            {
                if (bindType == BindType.Form)
                {
                    var objUserProfile = userProfiles.FirstOrDefault();
                    if (objUserProfile != null)
                    {
                        UserCode    = objUserProfile.UCode;
                        UserLoginId = objUserProfile.LoginId.Trim();
                        Password    = objUserProfile.Password.Trim();
                        UserName    = objUserProfile.Name.Trim();
                        //LastName=objUserProfile.
                        Address = objUserProfile.Address.Trim();
                        City    = objUserProfile.City.Trim();
                        Country = objUserProfile.Country.Trim();
                        var filter = new KeyValuePairItems
                        {
                            new KeyValuePairItem(Constants.filter1, Constants.CountryType),
                            new KeyValuePairItem(Constants.filter2, Country),
                            new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextState),
                            new KeyValuePairItem(Constants.masterType, Constants.DdlCatHeaderData)
                        };
                        _genericClass.LoadDropDown(ddlState, filter, null, UserContext.DataBaseInfo);
                        State            = objUserProfile.State.Trim();
                        ZipCode          = objUserProfile.Zip.Trim();
                        Email            = objUserProfile.Email.Trim();
                        Mobile           = objUserProfile.Mobile.Trim();
                        ResidentialPhone = objUserProfile.ResPhone.Trim();
                        OfficePhone      = objUserProfile.OffPhone.Trim();
                        Dob        = objUserProfile.Dob.GetValueOrDefault();
                        EmployeeId = objUserProfile.EmpId.Trim();
                        Gender     = objUserProfile.Gender.Trim();
                        filter     = new KeyValuePairItems
                        {
                            new KeyValuePairItem(Constants.key, objUserProfile.UCode.ToString()),
                            new KeyValuePairItem(Constants.filter1, objUserProfile.Designation.Level.ToString(CultureInfo.InvariantCulture)),
                            new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextRManager),
                            new KeyValuePairItem(Constants.masterType, Constants.DdlRManager)
                        };
                        _genericClass.LoadDropDown(ddlReporting, filter, null, UserContext.DataBaseInfo);
                        ReportingTo = objUserProfile.ReportingTo.ToString().Trim();
                        Warehouse   = objUserProfile.Wh.Trim();
                        Department  = objUserProfile.Dept.Trim();
                        Designation = objUserProfile.Designation.Id.Trim();
                        Avator      = objUserProfile.Avatar.Trim();
                        ActiveTill  = objUserProfile.ActiveTill.GetValueOrDefault();
                        Branch      = objUserProfile.Branch.Trim().Trim();
                        Bu          = objUserProfile.Bu.Trim();
                        Status      = objUserProfile.Off.Trim();
                    }
                    lnkSave.Visible = hidAction.Value != Constants.ViewAction;
                    uplForm.Update();
                }
                else
                {
                    var userProfile = userProfiles.ToList();
                    if (UserContext.UserProfile.Designation.Id.Trim() != "SA")
                    {
                        if (userProfiles.Any())
                        {
                            userProfile = userProfiles.Where(x => x.Designation.Id.Trim() != "SA").ToList();
                        }
                    }
                    GridViewTable.DataSource = userProfile;
                    GridViewTable.DataBind();
                    uplView.Update();
                }
            }
        }