Ejemplo n.º 1
0
    protected void SaveActivities()
    {
        ActivityBO objActivity = new ActivityBO();

        objActivity.UserId = Userid;
        objActivity.Name   = txtActivities.Text;

        objActivity.Description = txtActivitiesDescription.Text;
        objActivity.Type        = Global.ACTIVITIES;

        if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtActivities.Text + Global.PICTURE_EXTENSION_JPG)))
        {
            objActivity.Image = txtActivities.Text + Global.PICTURE_EXTENSION_JPG;
        }
        else if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtActivities.Text + ".png")))
        {
            objActivity.Image = txtActivities.Text + ".png";
        }
        else
        {
            objActivity.Image = "DefaultActivities.png";
        }
        string ActivityId = ActivityBLL.insertActivity(objActivity);

        txtActivities.Text            = "";
        txtActivitiesDescription.Text = "";
        LoadDataListActivities();
    }
Ejemplo n.º 2
0
    protected void SaveInterests()
    {
        ActivityBO objActivity = new ActivityBO();

        objActivity.UserId = Userid;
        objActivity.Name   = txtInterests.Text;

        objActivity.Description = txtInterestsDescription.Text;
        objActivity.Type        = Global.INTERESTS;
        if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtInterests.Text + ".jpg")))
        {
            objActivity.Image = txtInterests.Text + ".jpg";
        }
        else if (System.IO.File.Exists(Server.MapPath("../../Resources/images/ProfileIcons/" + txtInterests.Text + ".png")))
        {
            objActivity.Image = txtInterests.Text + ".png";
        }
        else
        {
            objActivity.Image = "DefaultInterests.png";
        }
        string ActivityId = ActivityBLL.insertActivity(objActivity);

        txtInterests.Text            = String.Empty;
        txtInterestsDescription.Text = String.Empty;
        LoadDataListInterests();
    }