protected void Button_Submit_Click(object sender, EventArgs e) { string userID = (string)Session["userID"]; SentencesData sentences = new SentencesData(MapPath(".")); string sentenceID = sentences.AddSentence(TextBox_Sentence.Text, DropDownList_Fonts.SelectedItem.Value, userID); ActivitiesData activities = new ActivitiesData(MapPath(".")); activities.AddActivity("makeSentence", sentenceID, userID); Response.Redirect("sentence.aspx?id=" + sentenceID); }
protected void Button_Unfollow_Click(object sender, EventArgs e) { string userID = (string)Session["userID"]; string targetUserID = (string)Request.QueryString["id"]; FollowsData follows = new FollowsData(MapPath(".")); follows.RemoveFollow(userID, "user", targetUserID); ActivitiesData activities = new ActivitiesData(MapPath(".")); activities.AddActivity("followUser", targetUserID, userID); ShowFollowingStatus(); }
protected void Button_Follow_Click(object sender, EventArgs e) { string userID = (string)Session["userID"]; string fontID = (string)Request.QueryString["id"]; FollowsData follows = new FollowsData(MapPath(".")); follows.AddFollow(userID, "font", fontID); ActivitiesData activities = new ActivitiesData(MapPath(".")); activities.AddActivity("followFont", fontID, userID); ShowFollowing(); }
protected void Button_Submit_Click(object sender, EventArgs e) { var charactors = new System.Collections.Generic.Dictionary<string, string>(); string[] correspondences = TextBox_Correspondences.Text.Split(new char[]{'\r', '\n'}); foreach (string correspondence in correspondences) { string[] charactor = correspondence.Split(','); if (charactor.Length == 2) { charactors[charactor[0]] = charactor[1]; } } FontsData fonts = new FontsData(MapPath(".")); string fontID = fonts.AddFont(TextBox_FontName.Text, TextBox_FontProfile.Text, charactors); ActivitiesData activities = new ActivitiesData(MapPath(".")); activities.AddActivity("makeFont", fontID, (string)Session["userID"]); }