コード例 #1
0
    private void BindData()
    {
        string time0  = Request.QueryString["dt1"].Trim();
        string time1  = Request.QueryString["dt2"].Trim();
        string depart = Request.QueryString["depart"].Trim();
        string zeren  = Request.QueryString["zeren"].Trim();


        XT_UserLogBU logo1 = new XT_UserLogBU();

        this.GridView1.DataSource = logo1.GetUserLogList(time0, time1, depart, zeren);
        this.GridView1.DataBind();
        logo1.Close();
    }
コード例 #2
0
ファイル: footer.ascx.cs プロジェクト: sinyuewh/CJZC2007
    protected void budRelogin_Click(object sender, EventArgs e)
    {
        Hashtable ht = (Hashtable)Application["OnLineUser"];

        ht.Remove(Page.User.Identity.Name.Trim());

        XT_UserLogBU user1 = new XT_UserLogBU();

        user1.SignOutLogo(Page.User.Identity.Name);
        user1.Close();

        FormsAuthentication.SignOut();
        Response.Redirect("~/login.aspx", true);
    }
コード例 #3
0
ファイル: UserLogo.aspx.cs プロジェクト: sinyuewh/CJZC2007
    //处理统计事件
    void SelectTime1_StaticEvent(object sender, EventArgs e)
    {
        string dt1 = this.SelectTime1.BeginTime;
        string dt2 = this.SelectTime1.EndTime;

        DataSet      ds1      = new DataSet();
        XT_UserLogBU userlog1 = new XT_UserLogBU();
        DataSet      ds       = userlog1.GetUserLogList(dt1, dt2);

        userlog1.Close();

        string tableTitle = "";

        switch (this.SelectTime1.StaticType)
        {
        case SearchStaticType.年统计:
            tableTitle = this.SelectTime1.StaticYear + "年度用户上线统计表";
            break;

        case SearchStaticType.月统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticMonth + "月用户上线统计表";
            break;

        case SearchStaticType.季度统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticJidu + "季度用户上线统计表";
            break;

        default:
            string begtime = this.SelectTime1.BeginTime;
            if (begtime == "")
            {
                begtime = "过去";
            }

            string endtime = this.SelectTime1.EndTime;
            if (endtime == "")
            {
                endtime = "现在";
            }
            tableTitle = begtime + "~" + endtime + "用户上线统计表";
            break;
        }
        this.SetTableData(tableTitle, ds);
    }
コード例 #4
0
    //用户登录
    protected void btnCheck_Click()
    {
        U_UserNameBU user1  = new U_UserNameBU();
        bool         login1 = user1.Login(this.username.Text.Trim(), this.password.Text.Trim());

        user1.Close();
        if (login1 == false)
        {
            Util.alert(this.Page, "提示:用户名或密码不正确!");
        }
        else
        {
            Hashtable ht = (Hashtable)Application["OnLineUser"];
            ht[this.username.Text.Trim()] = this.username.Text.Trim();

            System.Web.Security.FormsAuthentication.SetAuthCookie(this.username.Text.Trim(), false);
            //FormsAuthentication.RedirectFromLoginPage(this.username.Text.Trim(), false);

            //写入用户登录日志(管理员忽略不写)
            if (this.username.Text.Trim() != "admin")
            {
                XT_UserLogBU logo1 = new XT_UserLogBU();
                logo1.AddLogo(this.username.Text.Trim());
                logo1.Close();
            }

            this.WirteLoginInfo(this.username.Text.Trim());


            //调整错误的数据
            this.RestoreErrorData();

            //进行数据的转向处理
            if (this.db.SelectedIndex == 0)  //转老资产管理数据库
            {
                Response.Redirect("~/zcdbWeb/default.aspx", true);
            }
            else                             //转联想资产管理数据库
            {
            }
        }
    }
コード例 #5
0
    protected void budRelogin_Click(object sender, EventArgs e)
    {
        Hashtable ht = (Hashtable)Application["OnLineUser"];

        ht.Remove(Page.User.Identity.Name.Trim());

        XT_UserLogBU user1 = new XT_UserLogBU();

        user1.SignOutLogo(Page.User.Identity.Name);
        user1.Close();

        FormsAuthentication.SignOut();

        //返回父系统登录主页
        String url1 = ConfigurationManager.AppSettings["parenturl"];

        //url1 = url1 + Server.UrlDecode(this.username.Text);
        Response.Redirect(url1, true);

        //Response.Redirect("~/login.aspx", true);
    }
コード例 #6
0
    //用户登录
    protected void btnCheck_Click()
    {
        U_UserNameBU user1  = new U_UserNameBU();
        bool         login1 = user1.Login(this.username.Text.Trim(), this.password.Text.Trim());

        user1.Close();
        if (login1 == false)
        {
            Util.alert(this.Page, "提示:用户名或密码不正确!");
        }
        else
        {
            Hashtable ht = (Hashtable)Application["OnLineUser"];
            ht[this.username.Text.Trim()] = this.username.Text.Trim();

            //System.Web.Security.FormsAuthentication.SetAuthCookie(this.username.Text.Trim(), false);
            //FormsAuthentication.RedirectFromLoginPage(this.username.Text.Trim(), false);

            //设置登录信息
            //建立身份验证票对象
            FormsAuthenticationTicket Ticket = new FormsAuthenticationTicket(1, this.username.Text,
                                                                             DateTime.Now, DateTime.Today.AddDays(1), true, this.username.Text, "/");

            string     HashTicket = FormsAuthentication.Encrypt(Ticket); //加密序列化验证票为字符串
            HttpCookie UserCookie = new HttpCookie(FormsAuthentication.FormsCookieName, HashTicket);
            Response.Cookies.Add(UserCookie);                            //输出Cookie



            //写入用户登录日志(管理员忽略不写)
            if (this.username.Text.Trim() != "admin")
            {
                XT_UserLogBU logo1 = new XT_UserLogBU();
                logo1.AddLogo(this.username.Text.Trim());
                logo1.Close();
            }

            if (this.chk1.Checked)
            {
                WebFrame.Util.JCookie.SetCookieValue("myPassWord", this.password.Text);
            }
            else
            {
                WebFrame.Util.JCookie.SetCookieValue("myPassWord", "");
            }

            this.WirteLoginInfo(this.username.Text.Trim());


            //调整错误的数据
            this.RestoreErrorData();

            //进行数据的转向处理
            if (this.db.SelectedIndex == 0)  //转老资产管理数据库
            {
                Response.Redirect("default0.aspx", true);
            }
            else                             //转汉口银行资产管理数据库
            {
                String url1 = ConfigurationManager.AppSettings["hkbankurl"];
                url1 = url1 + Server.UrlEncode(this.username.Text);
                Response.Redirect(url1, true);
            }
        }
    }