Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IAClass.Entity.UserType LoginUseType = UserClass.GetUserType(User.Identity.Name);

        if (LoginUseType == IAClass.Entity.UserType.Default)
        {
            Response.Redirect("DefaultUser.aspx", true);
        }
        else if (LoginUseType == IAClass.Entity.UserType.Insurer)
        {
            Response.Redirect("DefaultInsurer.aspx", true);
        }

        BindIt();

        if (!IsPostBack)
        {
            this.ddlProduct.DataBind();
            this.ddlProduct.Items.Add(new ListItem("--全部产品--", "0"));
            this.ddlProduct.SelectedIndex = this.ddlProduct.Items.Count - 1;

            this.txtDateStart.Text = this.txtDateEnd.Text = DateTime.Today.ToShortDateString();

            this.lblUsername.Text = User.Identity.Name;

            string count   = Serial.GetBalance(User.Identity.Name).ToString();
            string balance = UserClass.GetBalance(User.Identity.Name).ToString();

            this.lblCount.Text   = count;
            this.lblBalance.Text = balance;
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.SqlDataSource1.SelectParameters["caseOwner"].DefaultValue = User.Identity.Name;

        if (!IsPostBack)
        {
            this.txtDateStart.Text = this.txtDateEnd.Text = DateTime.Today.ToShortDateString();
            this.lblUsername.Text  = User.Identity.Name;

            string count   = Serial.GetBalance(User.Identity.Name).ToString();
            string balance = UserClass.GetBalance(User.Identity.Name).ToString();

            this.lblCount.Text   = count;
            this.lblBalance.Text = balance;
        }
    }