Пример #1
0
        /// <summary>
        /// 自动执行节点
        /// </summary>
        private void DoAutoNode()
        {
            string    sql = "SELECT * FROM WF_GenerWorkerList WHERE FK_Node IN (SELECT NODEID FROM WF_Node WHERE (WhoExeIt=1 OR  WhoExeIt=2) AND IsPass=0 AND IsEnable=1) ORDER BY FK_Emp";
            DataTable dt  = DBAccess.RunSQLReturnTable(sql);

            foreach (DataRow dr in dt.Rows)
            {
                Int64  workid  = Int64.Parse(dr["WorkID"].ToString());
                int    fk_node = int.Parse(dr["FK_Node"].ToString());
                string fk_emp  = dr["FK_Emp"].ToString();
                string fk_flow = dr["FK_Flow"].ToString();

                try
                {
                    if (WebUser.No != fk_emp)
                    {
                        WebUser.Exit();
                        Emp emp = new Emp(fk_emp);
                        WebUser.SignInOfGener(emp);
                    }
                    string msg = BP.WF.Dev2Interface.Node_SendWork(fk_flow, workid).ToMsgOfText();
                    this.SetText("@处理:" + WebUser.No + ",WorkID=" + workid + ",正确处理:" + msg);
                }
                catch (Exception ex)
                {
                    this.SetText("@处理:" + WebUser.No + ",WorkID=" + workid + ",工作信息:" + ex.Message);
                }
            }
        }
Пример #2
0
    //登录方法
    private void Login()
    {
        string user = TB_No.Text.Trim();
        string pass = TB_Pass.Text.Trim();

        //判断是否是记住密码
        if (hidIsRememberedPass.Value == "1")
        {
            pass = Emp.DecryptPass(pass);
        }

        try
        {
            if (WebUser.No != null)
            {
                WebUser.Exit();
            }

            if (user.ToLower() == "guest")
            {
                this.Alert("guest 用户不能登录内部用户的处理程序. ");
                return;
            }

            Emp em = new Emp();
            em.No = user;
            if (em.RetrieveFromDBSources() == 0)
            {
                this.Alert("用户名密码错误,注意密码区分大小写,请检查是否按下了CapsLock.。");
                return;
            }

            if (em.CheckPass(pass))
            {
                //bool bl = this.IsRemember.Checked;

                //WebUser.SignInOfGenerLang(em, WebUser.SysLang, bl);
                //if (this.Request.RawUrl.ToLower().Contains("wap"))
                //    WebUser.IsWap = true;
                //else
                //    WebUser.IsWap = false;
                //WebUser.Token = this.Session.SessionID;

                //调用登录接口,让BP框架登录.
                BP.WF.Dev2Interface.Port_Login(em.No, this.IsRemember.Checked);

                Response.Redirect("Default.aspx", false);
                return;
            }
            this.Alert("用户名密码错误,注意密码区分大小写,请检查是否按下了CapsLock.。");
        }
        catch (System.Exception ex)
        {
            this.Alert("@用户名密码错误!@检查是否按下了CapsLock.@更详细的信息:" + ex.Message);
        }
    }
Пример #3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string user = txtUserName.Text.Trim();
            string pass = txtPassword.Text.Trim();

            try
            {
                if (WebUser.No != null)
                {
                    WebUser.Exit();
                }

                BP.Port.Emp em = new BP.Port.Emp(user);
                if (em.CheckPass(pass))
                {
                    bool bl = this.IsRemember.Checked;
                    WebUser.SignInOfGenerLang(em, WebUser.SysLang, bl);
                    if (this.Request.RawUrl.ToLower().Contains("wap"))
                    {
                        WebUser.IsWap = true;
                    }
                    else
                    {
                        WebUser.IsWap = false;
                    }

                    WebUser.Token = this.Session.SessionID;

                    string s = "";
                    s = BP.Web.WebUser.No;
                    if (string.IsNullOrEmpty(s))
                    {
                        s = BP.Web.WebUser.NoOfRel;
                    }
                    if (string.IsNullOrEmpty(s))
                    {
                        throw new Exception("@编号没有写入:" + s);
                    }

                    this.Response.Redirect("Default.aspx?ss=" + s + "&DDD=" + em.No, false);
                    return;
                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "kesy", "<script language=JavaScript>alert('用户名密码错误,注意密码区分大小写,请检查是否按下了CapsLock.。');</script>");
                }
            }
            catch (System.Exception ex)
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "kesy", "<script language=JavaScript>alert('@用户名密码错误!@检查是否按下了CapsLock.@更详细的信息:" + ex.Message + "');</script>");
            }
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            switch (this.DoType)
            {
            case "Out":
                WebUser.Exit();
                this.Response.Redirect("Login.aspx", true);
                break;

            default:
                break;
            }
        }
Пример #5
0
 protected void Btn_O_Click(object sender, System.EventArgs e)
 {
     try
     {
         WebUser.Exit();
         //this.url=this.Request.QueryString["url"];
         this.Response.Write("现在,您已经安全的退出了系统,谢谢使用,再见!");
     }
     catch (System.Exception ex)
     {
         this.Response.Write(ex.Message);
         //this.ResponseWriteRedMsg(ex) ;
     }
 }
Пример #6
0
    private void Login()
    {
        string user = TB_No.Text.Trim();
        string pass = TB_Pass.Text.Trim();

        try
        {
            //关闭已登录用户
            if (WebUser.No != null)
            {
                WebUser.Exit();
            }

            Emp em = new Emp();
            em.No = user;
            if (em.RetrieveFromDBSources() == 0)
            {
                //  this.TB_No.Text = "";
                return;
            }


            if (em.CheckPass(pass))
            {
                bool bl = this.IsRemember.Checked;
                WebUser.SignInOfGenerLang(em, WebUser.SysLang, bl);

                if (this.Request.RawUrl.ToLower().Contains("wap"))
                {
                    WebUser.IsWap = true;
                }
                else
                {
                    WebUser.IsWap = false;
                }

                WebUser.Token = this.Session.SessionID;

                Response.Redirect("Default.aspx", false);
                return;
            }
            this.Alert("用户名密码错误,注意密码区分大小写,请检查是否按下了CapsLock.。");
        }
        catch (System.Exception ex)
        {
            this.Alert("@用户名密码错误!@检查是否按下了CapsLock.@更详细的信息:" + ex.Message);
        }
    }
Пример #7
0
    private void Login()
    {
        string user = txtUserName.Text.Trim();
        string pass = txtPassword.Text.Trim();

        try
        {
            //关闭已登录用户
            if (WebUser.No != null)
            {
                WebUser.Exit();
            }

            Emp em = new Emp(user);
            if (em.CheckPass(pass))
            {
                WebUser.SignInOfGenerLang(em, WebUser.SysLang);

                if (this.Request.RawUrl.ToLower().Contains("wap"))
                {
                    WebUser.IsWap = true;
                }
                else
                {
                    WebUser.IsWap = false;
                }

                WebUser.Token = this.Session.SessionID;

                Response.Redirect("Default.aspx", false);
                return;
            }
            this.Alert("用户名密码错误,注意密码区分大小写,请检查是否按下了CapsLock.。");
        }
        catch (System.Exception ex)
        {
            this.Alert("@用户名密码错误!@检查是否按下了CapsLock.@更详细的信息:" + ex.Message);
        }
    }
Пример #8
0
 void btn_Loin_Exit_Click(object sender, EventArgs e)
 {
     WebUser.Exit();
     this.Response.Redirect("AuthorDemo.aspx");
 }
Пример #9
0
 /// <summary>
 /// 注销当前登录
 /// </summary>
 public static void Port_SigOut()
 {
     WebUser.Exit();
 }