示例#1
0
    protected void LoadBasicInfo()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo = BasicInfoBLL.getBasicInfoByUserId(Userid);

        BasicInfoBO objFriendBasicInfo = null;

        if (Session["FriendID"] != null)
        {
            if (Session["FriendID"].ToString() != "")
            {
                objFriendBasicInfo = new BasicInfoBO();
                objBasicInfo       = BasicInfoBLL.getBasicInfoByUserId(Session["FriendID"].ToString());
            }
        }

        if (objFriendBasicInfo.HomeTown != null)
        {
            lblHomeTown.Text = objBasicInfo.HomeTown + " and " + objFriendBasicInfo.HomeTown;
        }
        else
        {
            lblHomeTown.Text = objBasicInfo.HomeTown;
        }

        if (objFriendBasicInfo.CurrentCity != null)
        {
            lblCurrentCity.Text = objBasicInfo.CurrentCity + " and " + objFriendBasicInfo.CurrentCity;
        }
        else
        {
            lblCurrentCity.Text = objBasicInfo.CurrentCity;
        }
    }
示例#2
0
    protected void LoadBasicInfo()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo = BasicInfoBLL.getBasicInfoByUserId(Userid);
        lstRelationshipStatus.SelectedValue = objBasicInfo.RelationshipStatus;
    }
示例#3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo.UserId        = Userid;
        objBasicInfo.CityTown      = txtTownCity.Text;
        objBasicInfo.Address       = txtAddress.Text;
        objBasicInfo.ZipCode       = txtZipCode.Text;
        objBasicInfo.Neighbourhood = txtNeighbourhood.Text;

        BasicInfoBLL.updateContactInfoPage(objBasicInfo);
        UpdateEmail();
        LoadContactInfo();

        PostProperties postProp = new PostProperties();

        postProp.PostText        = Global.POST_CHANGED_CONTACT_INFO;
        postProp.WallOwnerUserId = Userid;
        postProp.PostedByUserId  = Userid;
        postProp.PostType        = Global.PROFILE_CHANGE;
        postProp.EmbedPost       = null;
        PostOnWall.post(postProp);

        imgSave.Visible = true;
        lblSave.Visible = true;
    }
示例#4
0
    protected void LoadUser()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo        = BasicInfoBLL.getBasicInfoByUserId(Userid);
        lblHomeTown.Text    = objBasicInfo.HomeTown;
        lblCurrentCity.Text = objBasicInfo.CurrentCity;
    }
示例#5
0
    protected void saveRelationshipStatus()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo.UserId             = Userid;
        objBasicInfo.RelationshipStatus = lstRelationshipStatus.SelectedValue;
        BasicInfoBLL.updateFamilyPage(objBasicInfo);
        LoadBasicInfo();
    }
示例#6
0
    protected void LoadBasicInfo()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo = BasicInfoBLL.getBasicInfoByUserId(Userid);


        txtHometown.Text    = objBasicInfo.HomeTown;
        txtCurrentCity.Text = objBasicInfo.CurrentCity;
    }
示例#7
0
    public static BasicInfoBO getBasicInfoByUserId(string UserId)
    {
        BasicInfoBO obj = new BasicInfoBO();
        ArrayList   lst = database.getByParam("UserId", UserId, "c_BasicInfo");

        foreach (Object _o in lst)
        {
            obj = BasicInfoBLL.getConvertedObject(_o);
            break;
        }

        return(obj);
    }
示例#8
0
    protected void LoadContactInfo()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo = BasicInfoBLL.getBasicInfoByUserId(Userid);


        lblTownCity.Text      = objBasicInfo.CityTown;
        lblAddress.Text       = objBasicInfo.Address;
        lblZipCode.Text       = objBasicInfo.ZipCode;
        lblNeighbourhood.Text = objBasicInfo.Neighbourhood;
        //UserBO userObj= new UserBO();
        // userObj = UserBLL.getUserByUserId(userid);
        // txtPrimaryEmail.Text = userObj.Email;
    }
示例#9
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int      year      = Convert.ToInt32(lstYear.SelectedValue);
        int      month     = Convert.ToInt32(lstMonth.SelectedValue);
        int      day       = Convert.ToInt32(lstDay.SelectedValue);
        DateTime birthDate = new DateTime(year, month, day);
        DateTime now       = DateTime.Today;
        int      age       = now.Year - Convert.ToInt32(lstYear.SelectedValue);

        if (now < birthDate.AddYears(age))
        {
            age--;
        }

        if (age < 13)
        {
            CustomValidator1.IsValid = false;
        }

        if (Page.IsValid)
        {
            BasicInfoBO objBasicInfo = new BasicInfoBO();

            objBasicInfo.UserId      = Userid;
            objBasicInfo.CurrentCity = txtCurrentCity.Text;
            objBasicInfo.HomeTown    = txtHometown.Text;

            BasicInfoBLL.updateBasicInfoPage(objBasicInfo);
            // BasicInfoBLL.updateTownCity(txtCurrentCity.Text, txtHometown.Text, 1);
            UpdateUserInfo();
            LoadUserInfo();
            LoadBasicInfo();
            imgSave.Visible = true;
            lblSave.Visible = true;

            PostProperties postProp = new PostProperties();
            postProp.PostText        = Global.POST_CHANGED_BASIC_INFO;
            postProp.WallOwnerUserId = Userid;
            postProp.PostedByUserId  = Userid;
            postProp.PostType        = Global.PROFILE_CHANGE;
            postProp.EmbedPost       = null;
            PostOnWall.post(postProp);
        }
    }
示例#10
0
    protected void LoadContactInfo()
    {
        BasicInfoBO objBasicInfo = new BasicInfoBO();

        objBasicInfo = BasicInfoBLL.getBasicInfoByUserId(Userid);


        lblTownCity.Text = objBasicInfo.CityTown;
        if (lblTownCity.Text == "")
        {
            lblTownCity.Visible     = false;
            lblTownCiylabel.Visible = false;
        }
        lblAddress.Text = objBasicInfo.Address;
        if (lblAddress.Text == "")
        {
            lblAddress.Visible      = false;
            lblAddressLabel.Visible = false;
        }
        lblZipCode.Text = objBasicInfo.ZipCode;
        if (lblZipCode.Text == "")
        {
            lblZipCode.Visible      = false;
            lblZipCodeLabel.Visible = false;
        }
        lblNeighbourhood.Text = objBasicInfo.Neighbourhood;
        if (lblNeighbourhood.Text == "")
        {
            lblNeighbourhood.Visible      = false;
            lblNeighbourhoodLabel.Visible = false;
        }
        lblRelationshipStatus.Text = objBasicInfo.RelationshipStatus;
        //UserBO userObj= new UserBO();
        // userObj = UserBLL.getUserByUserId(userid);
        // txtPrimaryEmail.Text = userObj.Email;
    }
示例#11
0
 public static void updateContactInfoPage(BasicInfoBO objBasicInfo)
 {
     BasicInfoBLL.updateBasicInfoPage(objBasicInfo);
 }
示例#12
0
 public static void updateFamilyPage(BasicInfoBO objBasicInfo)
 {
     BasicInfoBLL.updateFamilyPage(objBasicInfo);
 }