Example #1
0
    //Bind data
    private void BindData(string danwei)
    {
        U_ZCTimeBU time1 = new U_ZCTimeBU();
        DataSet    ds1   = time1.GetMyTimeList(User.Identity.Name, danwei);

        this.GridView1.DataSource = ds1;
        this.GridView1.DataBind();
        time1.Close();
        ds1.Dispose();
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            U_RolesBU role1    = new U_RolesBU();
            bool      isLeader = role1.isRole(new String[] { "公司领导", "综合管理", "评审部角色" });
            role1.Close();
            if (isLeader)
            {
                Response.Redirect("~/ZcMng1/ZongHeSearch.aspx", true);
            }
            else
            {
                this.BindData(null);
                //设置时效警告、邮件、最新信息的提示数据
                U_ZCTimeBU time1 = new U_ZCTimeBU();
                DataSet    ds1   = time1.GetMyTimeList(User.Identity.Name, null, 1);
                this.MyTimeCount.Value = ds1.Tables[0].Rows.Count + "";
                time1.Close();

                ZX_EmailBu email1 = new ZX_EmailBu();
                this.MyEmail.Value = email1.GetNewMailCount() + "";
                email1.Close();

                ZX_InfoBU info1 = new ZX_InfoBU();
                this.MyInfo.Value = info1.GetNewInfoCount() + "";
                info1.Close();


                if ((this.MyTimeCount.Value != "0" || this.MyEmail.Value != "0" || this.MyInfo.Value != "0") &&
                    Session["noReminder_" + User.Identity.Name] == null &&
                    Request.Cookies["noReminder_" + User.Identity.Name] == null)
                {
                    string js = "StartReminder();";
                    if (!Page.ClientScript.IsStartupScriptRegistered("StartJS"))
                    {
                        Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "StartJS", js, true);
                    }
                }
            }
        }
        this.AdvanceSearch1.SetDepartRow(false);
        this.AdvanceSearch1.OnMySearchClick += new EventHandler(AdvanceSearch1_OnMySearchClick);
        this.SearchControl1.SearchEvent     += new EventHandler(SearchControl1_SearchEvent);
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZX_EmailBu email1 = new ZX_EmailBu();
            this.newmail.Text = email1.GetNewMailCount() + "";
            email1.Close();

            ZX_InfoBU info1 = new ZX_InfoBU();
            this.newinfo.Text = info1.GetNewInfoCount() + "";
            info1.Close();

            U_ZCTimeBU time1 = new U_ZCTimeBU();
            DataSet    ds1   = time1.GetMyTimeList(User.Identity.Name, null, 1);
            this.MyTime.Text = ds1.Tables[0].Rows.Count + "";
            ds1.Dispose();
            time1.Close();
        }
    }