private void SearchButton1_Click(object sender, EventArgs e) { //保存用户的搜索状态 View_WeblogUserXSJBXX v = new View_WeblogUserXSJBXX(); v.User_NickName = SearchByNickName.Text.Trim(); v.User_Name = SearchByName.Text.Trim(); v.User_QQ = SearchByQQ.Text.Trim(); v.XH = SearchByXH.Text.Trim(); v.XB = RadioList.SelectedValue; v.YXSH = DropXY.SelectedValue; v.ZYH = DropZY.SelectedValue; HttpContext.Current.Session["SearchKey"] = null; if (v.User_NickName != "" || v.User_Name != "" || v.User_QQ != "" || v.XH != "" || v.XB != "0" || v.YXSH != "" || v.ZYH != "") { HttpContext.Current.Session["SearchKey"] = v; } HttpContext.Current.Response.Redirect("/" + blogContext.Owner.User_DomainName + "/Manage/AddFriend.aspx"); }
/// <summary>Called before a View_WeblogUserXSJBXX is deleted.</summary> /// <param name="instance">The instance.</param> partial void DeleteView_WeblogUserXSJBXX(View_WeblogUserXSJBXX instance);
/// <summary>Called before a View_WeblogUserXSJBXX is updated.</summary> /// <param name="instance">The instance.</param> partial void UpdateView_WeblogUserXSJBXX(View_WeblogUserXSJBXX instance);
/// <summary>Called before a View_WeblogUserXSJBXX is inserted.</summary> /// <param name="instance">The instance.</param> partial void InsertView_WeblogUserXSJBXX(View_WeblogUserXSJBXX instance);
public static IEnumerable<View_WeblogUserXSJBXX> Search(View_WeblogUserXSJBXX VW) { BlogDataDataContext BD = new BlogDataDataContext(); return BD.View_WeblogUserXSJBXXes.Where(p => p.XH == VW.XH); }