protected void submit_Click(object sender, EventArgs e) { Lucene_gl lucene = new Lucene_gl(); Data data = new Data(); Profile_gl profile = new Profile_gl(); profile.update(Param); lucene.addLucene(data); go("../client/profile.aspx?profile=" + Param.getString("name") + "&id=" + Param.getString("profileID")); }
protected void submit_Click(object sender, EventArgs e) { Lucene_gl lucene = new Lucene_gl(); Data data = new Data(); Profile_gl profile = new Profile_gl(); profile.insert(Param); Data list = profile.selectInserted(Param); lucene.addLucene(list); go("../client/profile.aspx?profile=" + list.getString("name") + "&id=" + list.getString("id")); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Data data = new Data(); Search_gl search = new Search_gl(); Paging_gl page = new Paging_gl(); Profile_gl profile = new Profile_gl(); Lucene_gl lucene = new Lucene_gl(); Data list = null; data.add("search", search.searchUrlConversion(Param.getString("search"))); data.add("page", page.getCurrentSearchPage(Param.getString("page"))); data.add("range", Param.getString("range")); data.add("rate", Param.getString("rate")); if (data.getString("search") == "") { list = search.selectAll(data); } else { list = lucene.searchLucene(data); } int count = page.setPage(data); for (int i = 1; i <= count; i++) { dropDownPage.Items.Add(new ListItem(i.ToString())); } dropDownPage.SelectedValue = Param.getString("page"); if (page.previousPage(Param.getString("page")) == true) { previous.Visible = false; } if (page.nextPage(Param.getString("page"), count) == true) { next.Visible = false; } // data.add all values in to same array, pass data array to advance search class in logical lib and split in to multiple search methods. if (data.getString("range") != "" && data.getString("search") != "") { int range = Convert.ToInt32(data.getString("range")); if (range > 0) { data.add("address", data.getString("search")); list = search.searchRadius(data); } } searchView.DataSource = list.Source; searchView.DataBind(); } }
public int findTotalPost(Data data) { Lucene_gl lucene = new Lucene_gl(); Profile_gl profile = new Profile_gl(); if (data.getString("search") == "") { return profile.selectAll(data).Count; } else { return lucene.searchLucene(data).Count; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Profile_gl profile = new Profile_gl(); User_gl user = new User_gl(); Data data = new Data(); if (user.isLogin(Session) == true) { data.add("username", user.getUsername(Session)); data.add("user_id", user.getUserID(data).getString("id")); edit.Visible = true; } Data list = profile.select(Param); nameLbl.Text = list.getString("name"); trading_hour.Text = Server.HtmlDecode(list.getString("trading_hour")); phone.Text = Server.HtmlDecode(list.getString("phone")); address.Text = list.getString("address"); email.Text = list.getString("email"); summary.Text = Server.HtmlDecode(list.getString("summary")); profile_name.Value = list.getString("name"); profile_id.Value = list.getString("id"); data.add("profile_id", list.getString("id")); //rating in percentage Rating_gl rating = new Rating_gl(); data.add("totalRating", rating.getTotalRating(data).ToString()); rating1.Value = rating.getRatingOne(data).ToString(); rating2.Value = rating.getRatingTwo(data).ToString(); rating3.Value = rating.getRatingThree(data).ToString(); rating4.Value = rating.getRatingFour(data).ToString(); rating5.Value = rating.getRatingFive(data).ToString(); setPageTypeSession(Session, "profile"); //number of rated users numRated1.Text = rating.numPerRate(data, "5").ToString(); numRated2.Text = rating.numPerRate(data, "4").ToString(); numRated3.Text = rating.numPerRate(data, "3").ToString(); numRated4.Text = rating.numPerRate(data, "2").ToString(); numRated5.Text = rating.numPerRate(data, "1").ToString(); double totalRating = rating.averageRating(data); totalRatingLbl.Text = string.Format("{0:0.##}", totalRating); rating_status.Value = rating.rateStatus(Session, data); } }
protected void Page_Load(object sender, EventArgs e) { Data data = new Data(); Profile_gl profile = new Profile_gl(); User_gl user = new User_gl(); if (user.isLogin(Session) == true) { data.add("username", user.getUsername(Session)); profileID.Value = Param.getString("id"); profileName.Value = Param.getString("profile"); } else { go("../client/profile.aspx?profile=" + Param.getString("profile") + "&id=" + Param.getString("id")); } //resize photo in album with top/left negative px value with fixed size image. }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Data data = new Data(); Profile_gl profile = new Profile_gl(); User_gl user = new User_gl(); data.add("username", user.getUsername(Session)); Data list = profile.select(Param); name.Text = list.getString("name"); trading_hour.Text = list.getString("trading_hour"); phone.Text = list.getString("phone"); address.Text = list.getString("address"); email.Text = list.getString("email"); summary.Text = list.getString("summary"); profileID.Value = list.getString("id"); } }