protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { string _Scripts = ""; List <string> _Loadcss = new List <string>(); _Loadcss.Add("web\\css\\intellidate"); _Scripts = _Scripts + "\n" + Helper.LoadCSS(_Loadcss.ToArray()); List <string> _LoadMessages = new List <string>(); List <string> _LoadJs = new List <string>(); _LoadJs.Add("Scripts\\js_fun"); _Scripts = _Scripts + "\n" + Helper.LoadScripts(_LoadJs.ToArray(), _LoadMessages.ToArray(), true); ltScripts.Text = _Scripts; string SitePath = System.Configuration.ConfigurationManager.AppSettings["SitePath"].ToString(); if (Request.QueryString["RematchID"] != null) { /// <summary> /// 1 = Rematch (this is contain expire date) 2.5$ /// 2 = Compatability report 1$ (only one report for 1$) /// 3 = facebook and linkedin contacts(mutual friends) 1$ /// 4 = read/deleted 0.5 $ (this is for 2 users conversations read/delete status) /// </summary> int _RematchID = Convert.ToInt32(Request.QueryString["RematchID"]); int UserID = Convert.ToInt32(HttpContext.Current.User.Identity.Name); User _GetUser = new User().GetUserDetails(_RematchID); //create sesssion for maintain rematchid Session["OtherUserID"] = _RematchID.ToString(); Session["CartType"] = "1"; if (_GetUser.ProfilePhoto != null) { imgReMatchImage.Src = new Utils().GetPhotoPCTPath(_GetUser.ProfilePhoto.PhotoID, Page.Request); } else { if (_GetUser.Gender == 1) { imgReMatchImage.Src = SitePath + "web/images/M.png"; } else { imgReMatchImage.Src = SitePath + "web/images/F.png"; } } //set avilable date DateTime _AvilableDate = new ProfileRematch().GetRemtchAvilableDate(UserID, _RematchID); string _DateString = _AvilableDate.Date.Month.ToString() + "." + _AvilableDate.Date.Day.ToString() + "." + _AvilableDate.Date.Year.ToString(); divAvilableDate.InnerHtml = _DateString; divRematchName.InnerHtml = _GetUser.LoginName; } } catch (Exception) { } } }
protected void Page_Load(object sender, EventArgs e) { //_OtherUserID set in script //pass url like Profile?ramana#aboutme if (!Page.IsPostBack) { string _queryString = HttpContext.Current.Request.RawUrl; string m_SitePath = ConfigurationManager.AppSettings["SitePath"].ToString(); if (_queryString.IndexOf('?') != -1) { string _Scripts = string.Empty; string _hideTabNames = string.Empty; string _otherUserName = _queryString.Split('?')[1].ToString(); User _OtherUserDetails = new User().GetUserDetails(_otherUserName, false); int UserID = Convert.ToInt32(HttpContext.Current.User.Identity.Name); if (_OtherUserDetails != null) { //check this user exist in 7 days(today's) match bool m_IsUserWithInTodaysBank = new UserTodayMatch().IsUserWithInBank(UserID, _OtherUserDetails.UserID); //check this user exist in 7 days rematch bool m_IsUserWithInRematchBank = new ProfileRematch().IsMatchExistInBank(UserID, _OtherUserDetails.UserID); if (!m_IsUserWithInTodaysBank && !m_IsUserWithInRematchBank) { Response.Redirect(m_SitePath + "web/PageNotFound"); } else { if (UserID != _OtherUserDetails.UserID) { _Scripts = _Scripts + "\n" + "<script type=\"text/javascript\">var _OtherUserID=\"" + _OtherUserDetails.UserID.ToString() + "\"</script>"; _Scripts = _Scripts + "\n" + "<script type=\"text/javascript\">var _OtherUserGender=\"" + _OtherUserDetails.Gender.ToString() + "\"</script>"; ltJScripts.Text = _Scripts; new IntellidateR1.ProfileView().AddNewProfileView(UserID, _OtherUserDetails.UserID); } else { Response.Redirect(m_SitePath + "web/Home"); } } } else { Response.Redirect(m_SitePath + "web/PageNotFound"); } } } }
public int Get() { try { int _UserID = Convert.ToInt32(HttpContext.Current.User.Identity.Name); ProfileRematch _MyRematch = new ProfileRematch().GetYesterdayMyReMatch(_UserID); return(_MyRematch.MatchUserID); } catch (Exception) { return(0); } }