protected void DoLogin(ENT.Member member, bool chkIsRemember)
        {
            Session[SessionKeys.MemberInfo] = new SessionUser()
            {
                Id       = member.Id,
                NickName = member.NickName,
                Name     = member.Name,
                SurName  = member.Surname,
                Email    = member.Email
            };

            CrpytorEngine crp = new CrpytorEngine()
            {
                SecurityKey = SessionKeys.Cookie_MemberId
            };

            var httpCookie = new HttpCookie(SessionKeys.CookiePrefix);

            httpCookie.Values.Add(new NameValueCollection
            {
                { SessionKeys.Cookie_MemberId, crp.Encrypt(member.Id.ToString(), true).ToString(CultureInfo.InvariantCulture) }
            });
            httpCookie.Path   = "/";
            httpCookie.Secure = false;

            httpCookie.Expires = chkIsRemember ? DateTime.Now.AddDays(7) : DateTime.MinValue;
            Response.SetCookie(httpCookie);
        }
Exemple #2
0
        public void Insert_Member(Entity.Member p_Member)
        {
            if (p_Member == null)
                return;

            Entity.Member o_Member = new Entity.Member();
            o_Member.Member_ID = p_Member.Member_ID;
            o_Member.Member_Account = FilterUtility.FilterSQL(p_Member.Member_Account);
            o_Member.Member_PassWord = FilterUtility.FilterSQL(p_Member.Member_PassWord);
            o_Member.Member_Name_CN = FilterUtility.FilterSQL(p_Member.Member_Name_CN);
            o_Member.Member_Name_EN = FilterUtility.FilterSQL(p_Member.Member_Name_EN);
            o_Member.Member_Sex = p_Member.Member_Sex;
            o_Member.Member_Work = FilterUtility.FilterSQL(p_Member.Member_Work);
            o_Member.Member_Tel = FilterUtility.FilterSQL(p_Member.Member_Tel);
            o_Member.Member_Mobile = FilterUtility.FilterSQL(p_Member.Member_Mobile);
            o_Member.Member_Email = FilterUtility.FilterSQL(p_Member.Member_Email);
            o_Member.Member_Address = FilterUtility.FilterSQL(p_Member.Member_Address);
            o_Member.Member_Company_Name = FilterUtility.FilterSQL(p_Member.Member_Company_Name);
            o_Member.Member_Company_Tel = FilterUtility.FilterSQL(p_Member.Member_Company_Tel);
            o_Member.Member_Company_Address = FilterUtility.FilterSQL(p_Member.Member_Company_Address);
            o_Member.Member_Months = p_Member.Member_Months;
            o_Member.Member_Airlines = FilterUtility.FilterSQL(p_Member.Member_Airlines);
            o_Member.Member_Serial = FilterUtility.FilterSQL(p_Member.Member_Serial);
            o_Member.Member_Points = p_Member.Member_Points;
            o_Member.Member_Commission = p_Member.Member_Commission;
            o_Member.Member_Consumption = p_Member.Member_Consumption;
            o_Member.Member_Times = p_Member.Member_Times;
            o_Member.Member_Recommended = p_Member.Member_Recommended;
            o_Member.Member_ReSerial = FilterUtility.FilterSQL(p_Member.Member_ReSerial);
            o_Member.Member_Level = p_Member.Member_Level;
            o_Member.Member_AddTime = DateTime.Now;

            d_Member.Insert_Member(o_Member);
        }
 protected void DoLogin(Member member, bool chkIsRemember) => Session[SessionKeys.MemberInfo] = new SessionUser()
 {
     Id = member.Id,
     NickName = member.NickName,
     Name = member.Name,
     SurName = member.Surname,
     Email = member.Email
 };
Exemple #4
0
        public Entity.Member Get_MemberEmail(string p_Member_Email)
        {
            DataTable o_DataTable = d_Member.Select_Email(p_Member_Email);
            if (o_DataTable == null)
                return null;
            else
            {
                DataRow o_DataRow = o_DataTable.Rows[0];

                Entity.Member e_Member = new Entity.Member();
                DateRow_Member(o_DataRow, e_Member);

                return e_Member;
            }
        }
Exemple #5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            g_Language.Add(1, "中文");
            g_Language.Add(2, "英文");

            g_Title.Add(1, "华捷国际旅游");
            g_Title.Add(2, "HuaJie Travel");

            string[] g_ArticleName;
            g_ArticleName = new string[2];
            g_ArticleName[0] = "关于华捷";
            g_ArticleName[1] = "About HuaJie";
            g_Article.Add(1, g_ArticleName);

            g_ArticleName = new string[2];
            g_ArticleName[0] = "关于我们";
            g_ArticleName[1] = "About us";
            g_Article.Add(2, g_ArticleName);

            g_ArticleName = new string[2];
            g_ArticleName[0] = "成为会员能享受什么好处";
            g_ArticleName[1] = "To Be Member";
            g_Article.Add(3, g_ArticleName);

            string[] g_NewsName;
            g_NewsName = new string[2];
            g_NewsName[0] = "最新资讯";
            g_NewsName[1] = "News";
            g_News.Add(0, g_NewsName);

            g_NewsName = new string[2];
            g_NewsName[0] = "优惠资讯";
            g_NewsName[1] = "Offers";
            g_News.Add(1, g_NewsName);

            g_NewsName = new string[2];
            g_NewsName[0] = "行业资讯";
            g_NewsName[1] = "Industry";
            g_News.Add(2, g_NewsName);

            g_NewsName = new string[2];
            g_NewsName[0] = "表格下载";
            g_NewsName[1] = "Form Download";
            g_News.Add(3, g_NewsName);

            string[] g_KnowsName;
            g_KnowsName = new string[2];
            g_KnowsName[0] = "旅游需知";
            g_KnowsName[1] = "Knows";
            g_Knows.Add(0, g_KnowsName);

            g_KnowsName = new string[2];
            g_KnowsName[0] = "行李规定";
            g_KnowsName[1] = "Luggage";
            g_Knows.Add(1, g_KnowsName);

            g_KnowsName = new string[2];
            g_KnowsName[0] = "机楼地图";
            g_KnowsName[1] = "Maps";
            g_Knows.Add(2, g_KnowsName);

            string[] g_TravelName;
            g_TravelName = new string[2];
            g_TravelName[0] = "旅游路线";
            g_TravelName[1] = "Travel Routes";
            g_Travel.Add(0, g_TravelName);

            g_TravelName = new string[2];
            g_TravelName[0] = "国外旅游";
            g_TravelName[1] = "Abroad";
            g_Travel.Add(1, g_TravelName);

            g_TravelName = new string[2];
            g_TravelName[0] = "中国旅游";
            g_TravelName[1] = "China";
            g_Travel.Add(2, g_TravelName);

            g_LowFare.Add(0, "机票问价");
            g_LowFare.Add(1, "Ticket Price");

            g_Member_Forget.Add(0, "忘记密码");
            g_Member_Forget.Add(1, "Forget Password");

            if (Session["Member"] != null)
                g_Member = Session["Member"] as Entity.Member;

            if (Session["LanguageID"] != null)
                g_LanguageID = Convert.ToInt32(Session["LanguageID"].ToString());

            if (VerifyUtility.IsNumber_NotNull(Request["Article_ClassID"]) && Request["Article_ClassID"] != "0")
                g_Article_ClassID = Convert.ToInt32(Request["Article_ClassID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["News_ClassID"]) && Request["News_ClassID"] != "0")
                g_News_ClassID = Convert.ToInt32(Request["News_ClassID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["News_ID"]) && Request["News_ID"] != "0")
                g_News_ID = Convert.ToInt32(Request["News_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Knows_ClassID"]))
                g_Knows_ClassID = Convert.ToInt32(Request["Knows_ClassID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Knows_ID"]) && Request["Knows_ID"] != "0")
                g_Knows_ID = Convert.ToInt32(Request["Knows_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Travel_TypeID"]) && Request["Travel_TypeID"] != "0")
                g_Travel_TypeID = Convert.ToInt32(Request["Travel_TypeID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Travel_ID"]) && Request["Travel_ID"] != "0")
                g_Travel_ID = Convert.ToInt32(Request["Travel_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Member_ID"]) && Request["Member_ID"] != "0")
                g_Member_ID = Convert.ToInt32(Request["Member_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["LowFare_ID"]) && Request["LowFare_ID"] != "0")
                g_LowFare_ID = Convert.ToInt32(Request["LowFare_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Consumption_ID"]) && Request["Consumption_ID"] != "0")
                g_Consumption_ID = Convert.ToInt32(Request["Consumption_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Booking_ID"]) && Request["Booking_ID"] != "0")
                g_Booking_ID = Convert.ToInt32(Request["Booking_ID"]);

            if (VerifyUtility.IsNumber_NotNull(Request["Page"]) && Request["Page"] != "0")
                g_Page = Convert.ToInt32(Request["Page"]);
        }
        public Member MemberLogin(Member member)
        {
           return _connection.DbPath.ExecStoredProcedure<Member>("GetMemberLogin", new { member.Email }).FirstOrDefault();
       

        }
 Member IMemberBusiness.UpdateMember(Member member)
 {
     throw new NotImplementedException();
 }
 private ActionResult RedirectMemberProfile(Member member)
 {
     DoLogin(member, false);
     return GetMemberProfileInternalView();
 }
Exemple #9
0
        public Entity.Member Select_Member(string p_Member_Account, string p_Member_PassWord)
        {
            DataTable o_DataTable = d_Member.Select_Member(p_Member_Account, p_Member_PassWord);
            if (o_DataTable == null)
                return null;
            else
            {
                DataRow o_DataRow = o_DataTable.Rows[0];

                Entity.Member e_Member = new Entity.Member();
                DateRow_Member(o_DataRow, e_Member);

                return e_Member;
            }
        }
Exemple #10
0
        public Entity.Member Select_Member(int p_Member_Method, string p_Member_Content)
        {
            DataTable o_DataTable = d_Member.Select_Member(p_Member_Method, p_Member_Content);
            if (o_DataTable == null)
                return null;
            else
            {
                DataRow o_DataRow = o_DataTable.Rows[0];

                Entity.Member e_Member = new Entity.Member();
                DateRow_Member(o_DataRow, e_Member);

                return e_Member;
            }
        }
Exemple #11
0
        public Entity.Member[] Select_Member(string p_Search_Content, int p_Search_Method, int p_PageSize, int p_PageIndex)
        {
            p_Search_Content = FilterUtility.FilterSQL(p_Search_Content);

            DataTable o_DataTable = d_Member.Select_Member(p_Search_Content, p_Search_Method, p_PageSize, p_PageIndex, ref g_TotalCount, ref g_TotalPage);
            if (o_DataTable == null)
                return null;
            else
            {
                Entity.Member[] e_Member = new Entity.Member[o_DataTable.Rows.Count];

                int i = 0;
                foreach (DataRow o_DataRow in o_DataTable.Rows)
                {
                    e_Member[i] = new Entity.Member();
                    DateRow_Member(o_DataRow, e_Member[i]);

                    i++;
                }

                return e_Member;
            }
        }