Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckMemberPermission();
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        if (!IsPostBack)
        {
            if (Session["Default_Currency"] == null)
            {
                Session["Default_Currency"] = bzCurrency;
            }


            int RegQishu = CommonDataBLL.GetRegisterQishu(Session["Member"].ToString());


            //BtnQuery_Click(null, null);

            /*--------------------------------------------------------------------------------------------------------------------------------------*/

            if (Request.QueryString["expectnum"] != null)
            {
                expectnum = Convert.ToInt32(Request.QueryString["expectnum"]);
            }
            int maxExpectNum = DetialQueryBLL.IsSuanceJj(expectnum);
            if (Request.QueryString["type"] != null)
            {
                //历史奖金
                if (Request.QueryString["type"] == "0")
                {
                    if (maxExpectNum == 0)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000344", "当前没有已结算的工资") + "!');</script>");
                        //return;
                    }
                }
            }
            else
            {
                readBonus(maxExpectNum);
            }

            /*--------------------------------------------------------------------------------------------------------------------------------------*/
        }



        Translations();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.MemRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckMemberPermission();
        //获取标准币种
        bzCurrency = CommonDataBLL.GetStandard();
        if (!IsPostBack)
        {
            if (Session["Default_Currency"] == null)
            {
                Session["Default_Currency"] = bzCurrency;
            }


            int RegQishu = CommonDataBLL.GetRegisterQishu(Session["Member"].ToString());

            //CommonDataBLL.BindQishuListB(RegQishu,DropDownQiShu, false);
            //CommonDataBLL.BindQishuListB(RegQishu,DropDownQiShu1, false);

            //BtnQuery_Click(null,null);

            /*--------------------------------------------------------------------------------------------------------------------------------------*/

            if (Request.QueryString["expectnum"] != null)
            {
                expectnum = Convert.ToInt32(Request.QueryString["expectnum"]);
            }
            int maxExpectNum = DetialQueryBLL.IsSuanceJj(expectnum);
            if (Request.QueryString["type"] != null)
            {
                //历史奖金
                if (Request.QueryString["type"] == "0")
                {
                    if (maxExpectNum == 0)
                    {
                        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000344", "当前没有已结算的工资") + "!');</script>");
                        //return;
                    }
                    //drp.DataBound += new EventHandler(DropDownList1_SelectedIndexChanged);
                    //this.ExpectNum1.ExpectNum = expectnum;
                    //memberperformance.ExpectNum = expectnum;
                    //memberperformance.Type = 1;
                    //LinkButton1.Visible = true;
                    //td1.Visible = true;
                }
            }
            else
            {
                //this.ExpectNum1.ExpectNum = BLL.CommonClass.CommonDataBLL.GetMaxqishu();
                //memberperformance.ExpectNum = BLL.CommonClass.CommonDataBLL.GetMaxqishu();
                //memberperformance.Type = 1;
                readBonus();
                //LinkButton1.Visible = false;
                //td1.Visible = false;
                //ExpectNum1.Enable = false;
            }

            /*--------------------------------------------------------------------------------------------------------------------------------------*/
        }



        //Translations();
    }
Ejemplo n.º 3
0
    /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
    public void readBonus(int expectnum)
    {
        int       maxqs   = DetialQueryBLL.IsSuanceJj(expectnum);                                   // BLL.CommonClass.CommonDataBLL.GetMaxqishu();
        double    curreny = AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()));
        DataTable dt      = MemberInfoModifyBll.getBonusTable(maxqs, Session["Member"].ToString()); //第一个参数期数

        DataTable dt_one   = DAL.DBHelper.ExecuteDataTable("select IsSuance from config where ExpectNum=" + maxqs);
        string    IsSuance = dt_one.Rows[0]["IsSuance"].ToString();//是否显示

        if (dt.Rows.Count > 0)
        {
            if (curreny == 0)
            {
                //this.Label1.Text = "0";
                this.Label1.Text  = "0.00";
                this.Label2.Text  = "0.00";
                this.Label3.Text  = "0.00";
                this.Label4.Text  = "0.00";
                this.Label5.Text  = "0.00";
                this.Label6.Text  = "0.00";
                this.Label7.Text  = "0.00";
                this.Label8.Text  = "0.00";
                this.Label9.Text  = "0.00";
                this.Label10.Text = "0.00";
            }
            else
            {
                if (IsSuance == "0")
                {
                    this.Label1.Text  = "0.00";
                    this.Label2.Text  = "0.00";
                    this.Label3.Text  = "0.00";
                    this.Label4.Text  = "0.00";
                    this.Label5.Text  = "0.00";
                    this.Label6.Text  = "0.00";
                    this.Label7.Text  = "0.00";
                    this.Label8.Text  = "0.00";
                    this.Label9.Text  = "0.00";
                    this.Label10.Text = "0.00";
                }
                else
                {
                    //this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus0"]) / AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                    this.Label1.Text = (Convert.ToDouble(dt.Rows[0]["Bonus1"]) *
                                        AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))).ToString("0.00");
                    this.Label2.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus2"]) * curreny).ToString("0.00");
                    this.Label3.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus3"]) * curreny).ToString("0.00");
                    this.Label4.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus4"]) * curreny).ToString("0.00");
                    this.Label5.Text  = (Convert.ToDouble(dt.Rows[0]["Bonus5"]) * curreny).ToString("0.00");
                    this.Label6.Text  = (Convert.ToDouble(dt.Rows[0]["Kougl"]) * curreny).ToString("0.00");
                    this.Label7.Text  = (Convert.ToDouble(dt.Rows[0]["Koufl"]) * curreny).ToString("0.00");
                    this.Label8.Text  = (Convert.ToDouble(dt.Rows[0]["Koufx"]) * curreny).ToString("0.00");
                    this.Label9.Text  = (Convert.ToDouble(dt.Rows[0]["CurrentSolidSend"]) * curreny).ToString("0.00");
                    this.Label10.Text = (Convert.ToDouble(dt.Rows[0]["CurrentTotalMoney"]) * curreny).ToString("0.00");
                }
            }
        }
        else
        {
            //this.Label1.Text = "0.00";
            this.Label1.Text  = "0.00";
            this.Label2.Text  = "0.00";
            this.Label3.Text  = "0.00";
            this.Label4.Text  = "0.00";
            this.Label5.Text  = "0.00";
            this.Label6.Text  = "0.00";
            this.Label7.Text  = "0.00";
            this.Label8.Text  = "0.00";
            this.Label9.Text  = "0.00";
            this.Label10.Text = "0.00";
        }
    }