예제 #1
0
파일: Default.aspx.cs 프로젝트: cnbin/HLB
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     string IFPop = "否";
     //if (this.CheckBox1.Checked == true)
     //{
     //    IFPop = "是";
     //}
     ZWL.BLL.ERPUser MyUser = new ZWL.BLL.ERPUser();
     MyUser.UserLogin(TxtUserName.Text.Trim(), ZWL.Common.DEncrypt.DESEncrypt.Encrypt(TxtUserPwd.Text), IFPop, ConfigurationManager.AppSettings["OALogin"].ToString().Trim(), "Main/Main.aspx", cbRememberId.Checked);
 }
예제 #2
0
파일: Default.aspx.cs 프로젝트: cnbin/HLB
    protected void Page_Load(object sender, EventArgs e)
    {
        //需要真正清空登录用户时,请启用下面这句代码。考虑到部分用户不需要真正清空用户信息,只是转回登陆页。此处,留待自定义启用
        //ZWL.Common.PublicMethod.SetSessionValue("UserName", null);
        //验证序列号是否正确
        int IsPC = 0;
        if (!Page.IsPostBack)
        {
            TxtUserName.Text = ZWL.Common.PublicMethod.GetCookie("DTRememberName");
            string username = Request["UserName"];
            string userpwd = Request["UserPwd"];
            if (!string.IsNullOrEmpty(username))
                TxtUserName.Text = username;
            if (!string.IsNullOrEmpty(userpwd))
            {
                TxtUserPwd.Text = userpwd;
                TxtUserPwd.TextMode = TextBoxMode.SingleLine;
                IsPC = 1;
            }
            try
            {
                //当前序列号---------------------------------------------------------------------------
                string NowSerils = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 SerilsStr from ERPSerils");
                if (ZWL.Common.DEncrypt.DESEncrypt.Encrypt(GetMoAddress(), "www.cnsoftweb.com-13696432490").ToString() != NowSerils)
                {
                    //序列号错误
                   // ZWL.Common.MessageBox.ShowAndRedirect(this, "系统授权码验证无效!请联系佰鼎科技重新获取授权!", "SerilsSetting.aspx");
                }
            }
            catch
            {
                //ZWL.Common.MessageBox.ShowAndRedirect(this, "系统授权码验证无效!请联系佰鼎科技重新获取授权!", "SerilsSetting.aspx");
            }

            try
            {
                //时间字符串-----------------------------------------------------------------------------
                DateTime DateStr = DateTime.Parse(ZWL.Common.DEncrypt.DESEncrypt.Decrypt(ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 DateStr from ERPSerils"), "www.cnsoftweb.com-13696432490"));
                if (DateStr < DateTime.Now)
                {
                   // //使用时间到达
                    // ZWL.Common.MessageBox.ShowAndRedirect(this, "系统授权码过期!请联系佰鼎科技重新获取授权!", "SerilsSetting.aspx");
                }
            }
            catch
            {
                //ZWL.Common.MessageBox.ShowAndRedirect(this, "系统授权码过期!请联系佰鼎科技重新获取授权!", "SerilsSetting.aspx");
            }
        }

        //判断系统的IP限制
        PassORNo();
        if (IsPC > 0)
        {
            string IFPop = "否";
            ZWL.BLL.ERPUser MyUser = new ZWL.BLL.ERPUser();
            MyUser.UserLogin(TxtUserName.Text.Trim(), ZWL.Common.DEncrypt.DESEncrypt.Encrypt(TxtUserPwd.Text), IFPop, ConfigurationManager.AppSettings["OALogin"].ToString().Trim(), "Main/Main.aspx", cbRememberId.Checked);
        }
    }
예제 #3
0
파일: Default.aspx.cs 프로젝트: cnbin/HLB
 protected void ImageButton1_Click(object sender, EventArgs e)
 {
     ZWL.BLL.ERPUser MyUser = new ZWL.BLL.ERPUser();
     MyUser.UserLogin(TxtUserName.Text.Trim(), ZWL.Common.DEncrypt.DESEncrypt.Encrypt(TxtUserPwd.Text), "否", ConfigurationManager.AppSettings["OALogin"].ToString().Trim(), "Main.aspx",cbRememberId.Checked);
 }