private void BindMultpleFromCity()
        {
            EditProfileDal obj    = new EditProfileDal();
            var            ToCity = obj.BindToCity();

            obj = null;
            chklistFromcity.DataSource     = ToCity;
            chklistFromcity.DataTextField  = "city_name";
            chklistFromcity.DataValueField = "City_Idno";
            chklistFromcity.DataBind();
        }
        private void Populate(int userid)
        {
            EditProfileDal EditDAL  = new EditProfileDal();
            tblUserMast    userMast = EditDAL.Select(userid);
            string         gender   = "";

            if (userMast != null)
            {
                txtAddress.Text        = userMast.Address;
                ddlState.SelectedValue = userMast.State_Idno.ToString();
                ddlState_SelectedIndexChanged(null, null);
                ddlCity.SelectedValue = userMast.City_Idno.ToString();
                gender = userMast.Gender;

                ddlGender.SelectedValue = gender;
                //if (gender == "M")
                //{
                //    rdbmale.Checked = true;
                //}
                //else
                //{
                //    rdbfemale.Checked = true;
                //}

                if (Convert.ToString(userMast.DOB) != "")
                {
                    txtDOB.Text = Convert.ToString(Convert.ToDateTime(userMast.DOB).ToString("dd-MM-yyyy"));
                }
                else
                {
                    txtDOB.Text = "";
                }
                if (Convert.ToString(userMast.DOJ) != "")
                {
                    txtDOJ.Text = Convert.ToString(Convert.ToDateTime(userMast.DOJ).ToString("dd-MM-yyyy"));
                }
                else
                {
                    txtDOJ.Text = "";
                }
                var lst1 = EditDAL.SelectFromCity(userid);
                var lst2 = EditDAL.SelectFromCityIdno(userid);
                if (lst1.Count > 0)
                {
                    chklistFromcity.DataSource     = null;
                    chklistFromcity.DataSource     = lst1;
                    chklistFromcity.DataTextField  = "city_name";
                    chklistFromcity.DataValueField = "City_Idno";
                    chklistFromcity.DataBind();
                    if (lst2.Count > 0)
                    {
                        for (int i = 0; i < chklistFromcity.Items.Count; i++)
                        {
                            for (int j = 0; j < lst2.Count; j++)
                            {
                                if (Convert.ToInt64(chklistFromcity.Items[i].Value) == lst2[j].FrmCity_Idno)
                                {
                                    chklistFromcity.Items[i].Selected = true;
                                }
                            }
                        }
                    }
                }

                txtEmail.Text      = userMast.User_EmailId;
                txtEmail.Enabled   = false;
                txtFatherName.Text = userMast.User_FName;
                txtMobile.Text     = userMast.Mobile_No;
                txtPassword.Text   = WebTransport.Classes.EncryptDecryptPass.decryptPassword(userMast.User_Password);
                txtPassword.Attributes.Add("value", WebTransport.Classes.EncryptDecryptPass.decryptPassword(userMast.User_Password));
                hidPass.Value                 = WebTransport.Classes.EncryptDecryptPass.decryptPassword(userMast.User_Password);
                txtPhoneNo.Text               = userMast.Phone_No;
                txtUserName.Text              = userMast.User_Name;
                ddlDesig.SelectedValue        = userMast.Desig_Idno.ToString();
                ddlComputerUser.SelectedValue = userMast.Computer_User.ToString();
                hid.Value = userMast.User_Idno.ToString();
            }

            EditDAL = null;
        }