示例#1
0
        protected void btnLogin(object sender, EventArgs e)
        {
            string email    = LoginEmail.Value;
            string password = LoginPassword.Value;

            if (userBL.UserLogin(email, password))
            {
                Model.User user = new Model.User();
                user = userBL.GetUserID(email);
                Session["username"] = user.User_Name;
                Session["email"]    = email;
                Session["userID"]   = user.User_ID;
                Response.Redirect("../User/User_Index.aspx");
            }
            else if (enterpriceBL.EnterpriceLogin(email, password))
            {
                Model.Enterprice enterprice = enterpriceBL.GetEnterpriceID(email);
                //Session["enterprice"] = enterprice;
                Session["enterpriceName"] = enterprice.Enterprice_FullName;
                Session["email"]          = email;
                Session["enterpriceID"]   = enterprice.Enterprice_ID;
                Response.Redirect("../Enterprice/Recruit_list.aspx");
            }
            else
            {
                remind1 = "用户名或密码错误!";
            }
        }
        protected void FillEnterpriceInfo(object sender, EventArgs e)
        {
            string enterpriceFullName = corpname.Value;
            string enterpricePhone    = phone.Value;
            string email = Session["enterpriceName"].ToString();

            Session["enterpriceName"] = enterpriceFullName;

            Model.Enterprice enterprice = enterpriceBL.GetEnterpriceID(email);
            //Session["enterprice"] = enterprice;
            Session["enterpriceName"] = enterpriceFullName;
            Session["email"]          = email;
            Session["enterpriceID"]   = enterprice.Enterprice_ID;
            enterpriceBL.UpdateEnterpriceInfo(enterpriceFullName, enterpricePhone, email);
            Response.Redirect("FillEnterpriceInfo.aspx");
        }
 protected void FillEnterpriceInfo0(object sender, EventArgs e)
 {
     string fullName = corpname.Value;
     string shortName = corpsname.Value;
     string url = webPosition.Value;
     string introduction = corpinfo.Value;
     string location = Request.Form["prov"];
     string locationCity = Request.Form["city"];
     string scale = Request.Form["scale"];
     Model.Enterprice enterprice = new Model.Enterprice();
     enterprice.Enterprice_FullName = fullName;
     enterprice.Enterprice_ShortName = shortName;
     enterprice.Enterprice_Url = url;
     enterprice.Enterprice_Introduction = introduction;
     enterprice.Enterprice_Email = Session["email"].ToString();
     enterprice.Enterprice_Location = location;
     enterprice.Enterprice_LocationCity = locationCity;
     enterprice.Enterprice_Scale = scale;
     Enterprice.UpdateEnterpriceInfo0(enterprice);
     Response.Redirect("FillEnterpriceInfo2.aspx");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string email = Request.QueryString["email"].ToString();
         string activeCode = Request["activeCode"].ToString();
         string type = Request.QueryString["type"].ToString();
         Model.Enterprice enterprice = new Model.Enterprice();
         if (type.Equals("Enterprice") && Enterprice.ActiveEnterpriceAccount(email, activeCode))
         {
             enterprice = Enterprice.GetEnterpriceID(email);
             Session["Enterprice"] = enterprice;
             Session["enterpriceName"] = enterprice.Enterprice_FullName;
             Response.Redirect("Register_enterprice_Success.aspx");
         }
         else
         {
             Response.Write("用户已存在,但是激活码有误!");
         }
         Page.DataBind();
     }
 }
        protected void ResetPassword(object sender, EventArgs e)
        {
            string newPwd = pwd.Value;

            email = Session["email"].ToString();
            Model.User       user       = User.GetUserID(email);
            Model.Enterprice enterprice = Enterprice.GetEnterpriceID(email);
            if (user.User_ID != null)
            {
                if (User.SetPassword(email, newPwd) != 0)
                {
                    Response.Redirect("../Common/Login.aspx");
                }
            }
            else if (enterprice.Enterprice_ID != null)
            {
                if (Enterprice.SetPassword(email, newPwd) != 0)
                {
                    Response.Redirect("../Common/Login.aspx");
                }
            }
        }
示例#6
0
        protected void FillEnterpriceInfo0(object sender, EventArgs e)
        {
            string fullName     = corpname.Value;
            string shortName    = corpsname.Value;
            string url          = webPosition.Value;
            string introduction = corpinfo.Value;
            string location     = Request.Form["prov"];
            string locationCity = Request.Form["city"];
            string scale        = Request.Form["scale"];

            Model.Enterprice enterprice = new Model.Enterprice();
            enterprice.Enterprice_FullName     = fullName;
            enterprice.Enterprice_ShortName    = shortName;
            enterprice.Enterprice_Url          = url;
            enterprice.Enterprice_Introduction = introduction;
            enterprice.Enterprice_Email        = Session["email"].ToString();
            enterprice.Enterprice_Location     = location;
            enterprice.Enterprice_LocationCity = locationCity;
            enterprice.Enterprice_Scale        = scale;
            Enterprice.UpdateEnterpriceInfo0(enterprice);
            Response.Redirect("FillEnterpriceInfo2.aspx");
        }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string           email      = Request.QueryString["email"].ToString();
         string           activeCode = Request["activeCode"].ToString();
         string           type       = Request.QueryString["type"].ToString();
         Model.Enterprice enterprice = new Model.Enterprice();
         if (type.Equals("Enterprice") && Enterprice.ActiveEnterpriceAccount(email, activeCode))
         {
             enterprice                = Enterprice.GetEnterpriceID(email);
             Session["Enterprice"]     = enterprice;
             Session["enterpriceName"] = enterprice.Enterprice_FullName;
             Response.Redirect("Register_enterprice_Success.aspx");
         }
         else
         {
             Response.Write("用户已存在,但是激活码有误!");
         }
         Page.DataBind();
     }
 }