Exemplo n.º 1
0
    /// <summary>
    /// 创建新一期
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void addNewQishu_Click(object sender, EventArgs e)
    {
        int AudCount = Permissions.GetPermissions(EnumCompanyPermission.FinanceNewQi);

        if (AudCount != 4202)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000847", "对不起,您没有权限!") + "');</script>");
            return;
        }


        int temp = ReleaseBLL.GetMaxExpectNum();

        try
        {
            Application.UnLock();
            Application.Lock();
            //创建新一期
            ReleaseBLL.addNewQishu(temp + 1);

            RecycleApplication();
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001143", "新一期创建完成,请重新登录!") + "');top.location.href('index.aspx')</script>");
        }
        catch (Exception eps)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('" + GetTran("001144", "创建新一期时发生错误,重新创建!") + "')</script>");
        }
        finally
        {
            Application.UnLock();
            Application["jinzhi"] = "F";
        }
    }
Exemplo n.º 2
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow row in this.GridView1.Rows)
        {
            ChangeLogs cl = new ChangeLogs("config", "ltrim(rtrim(str(ExpectNum)))");

            int ExpectNum = int.Parse(row.Cells[0].Text);
            cl.AddRecord(ExpectNum);
            int  num   = 0;
            bool blean = (row.FindControl("CheckBox1") as CheckBox).Checked;
            if (blean)
            {
                num = ReleaseBLL.Release(ExpectNum, 1);
            }
            else
            {
                num = ReleaseBLL.Release(ExpectNum, 0);
            }

            if (num > 0)
            {
                cl.AddRecord(ExpectNum);
                cl.ModifiedIntoLogs(ChangeCategory.company39, ExpectNum.ToString(), ENUM_USERTYPE.objecttype3);
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!") + "')</script>");
            }
            GetShopList();
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceJiangjinshezhi);

        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        if (!IsPostBack)
        {
            if (Request.QueryString["qs"] != null)
            {
                ViewState["qs"] = Request.QueryString["qs"].ToString();
                bool blean = ReleaseBLL.IsProvide(Convert.ToInt32(ViewState["qs"].ToString()));
                if (blean)
                {
                    this.labmx.Text = "第 " + ViewState["qs"].ToString() + " 期已发放奖金明细";
                }
                else
                {
                    this.labmx.Text = "第 " + ViewState["qs"].ToString() + " 期未发放奖金明细";
                }
            }

            BtnConfirm_Click(null, null);
        }
        Translations();
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        //检查相应权限
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceTiaokong);
        if (!IsPostBack)
        {
            int MaxQs = ReleaseBLL.GetMaxExpectNum();
            if (MaxQs == 1)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001291", "当前最大期是第一期不能进入调控结算") + "')</script>");
                return;
            }

            if (MaxQs <= 10)
            {
                this.TextBox1.Text = "1";
                this.TextBox2.Text = Convert.ToString(MaxQs - 1);
            }
            else
            {
                this.TextBox1.Text = Convert.ToString(MaxQs - 10);
                this.TextBox2.Text = Convert.ToString(MaxQs - 1);
            }
            this.Label1.Text = "(" + GetTran("001140", "当前期数为") + "<font color=red>" + MaxQs.ToString() + "</font>," + GetTran("001141", "请输入") + "1-" + (MaxQs - 1).ToString() + GetTran("001142", "范围内的整数") + ")";
            //this.showTotalQishuLink(Convert.ToInt32(this.TextBox1.Text.Trim()),Convert.ToInt32(this.TextBox2.Text.Trim()));
            this.showTotalQishuLink1(MaxQs);
        }
        Translations();
    }
Exemplo n.º 5
0
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
            LinkButton button1 = (LinkButton)e.Row.FindControl("add_jj");
            LinkButton button2 = (LinkButton)e.Row.FindControl("cancle_jj");

            int ExpectNum = Convert.ToInt32(e.Row.Cells[0].Text.ToString().Trim());
            if (ReleaseBLL.IsProvide(ExpectNum))
            {
                button1.Visible = false;
            }
            else
            {
                button2.Visible = false;
            }

            button1.Attributes.Add("onClick", "return confirm('" + GetTran("001386", "你确定要添加吗?") + "');");
            button2.Attributes.Add("onClick", "return confirm('" + GetTran("001388", "你确定要撤消吗?") + "');");
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
            e.Row.Attributes.Add("style", "background-image:url('images/tabledp.gif')");
        }
        Translations();
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan, false);

        if (!IsPostBack && Request.QueryString["action"] + "" != "ajax")
        {
            string isP = IsExistsPid();

            if (isP != "-1")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>pgLoad('div2')</script>");
            }
        }

        if (Request.QueryString["action"] + "" == "ajax")
        {
            string err        = "-1";
            string Operatenum = CommonDataBLL.OperateBh;
            string Operateip  = CommonDataBLL.OperateIP;
            BlackListBLL.GetSystemClose(Operateip, Operatenum);
            try
            {
                //如果正在结算,就先停止结算再结算
                string isP = IsExistsPid();
                if (isP != "-1")
                {
                    DBHelper.ExecuteNonQuery("kill " + isP);
                }
                string id = CommonDataBLL.InsJsInfo(Convert.ToInt32(Request.QueryString["qs"]), CommonDataBLL.OperateIP, Session["Company"].ToString());

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@qs", Request.QueryString["qs"]),
                    new SqlParameter("@id", id),
                    new SqlParameter("@err", SqlDbType.Int)
                };

                param[2].Direction = ParameterDirection.Output;

                DBHelper.ExecuteNonQuery("[jsjj_yj]", param, CommandType.StoredProcedure);

                err = param[2].Value.ToString();

                if (err == "0")
                {
                    ReleaseBLL.UPConfigflag(int.Parse(Request.QueryString["qs"]));
                }
            }
            catch
            { }
            finally
            {
                BlackListBLL.GetSystemOpen(Operateip, Operatenum);
            }

            Response.Write(err);
            Response.End();
        }
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceFinanceStat);

        if (!IsPostBack)
        {
            //绑定币种  www-b874dce8700
            BindCurrency();
            CommonDataBLL.BindQishuList(this.DropQiShu1, false);
            CommonDataBLL.BindQishuList(this.DropQiShu2, false);
            this.DropQiShu2.SelectedValue = CommonDataBLL.getMaxqishu().ToString();
            int value = CommonDataBLL.getMaxqishu();

            if (value <= 10)
            {
                this.DropQiShu1.SelectedValue = "1";
            }
            else
            {
                this.DropQiShu1.SelectedValue = (value - 10).ToString();
            }

            this.DropQiShu2.SelectedValue = value.ToString();

            rateNum = ReleaseBLL.GetRate(Convert.ToInt32(this.DropCurrency.SelectedValue));
            Graph();
        }

        Translations();
    }
Exemplo n.º 8
0
 protected void lkbtn_JJYFTrue_Click(object sender, System.EventArgs e)
 {
     try
     {
         //撤销电子账户
         ReleaseBLL.Backout(Convert.ToInt32(Session["nowqishu"]));
         BeginBalanceProg();
     }
     catch
     {
         Response.Write(Transforms.ReturnAlert(GetTran("001215", "对不起,撤消电子帐户失败,请联系维护人员!")));
     }
 }
Exemplo n.º 9
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (this.Number.Text.Trim() == "")
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000787", "请输入编号!") + "')</script>");
            return;
        }

        MemberInfoModel info = ReleaseBLL.GetMemberInfo(this.Number.Text);

        if (info == null)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001536", "该编号不存在于系统中") + "')</script>");
            return;
        }

        try
        {
            double money = Convert.ToDouble(this.money.Text);
            if (money <= 0)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001539", "操作失败,输入的金额不能小于0!") + "')</script>");
                return;
            }

            if (this.question.Text.Trim() == "")
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001540", "退回原因不能为空!") + "')</script>");
                return;
            }
            ChongHongModel chonghong = new ChongHongModel();
            chonghong.MoneyNum  = money;
            chonghong.Number    = this.Number.Text;
            chonghong.ExpectNum = Convert.ToInt32(ViewState["qs"]);
            chonghong.Remark    = this.question.Text;
            chonghong.StartDate = DateTime.Now.ToUniversalTime();
            bool blean = ReleaseBLL.AddChongHong(chonghong);
            if (blean)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001401", "操作成功!") + "');location.href='StrikeBalancesView.aspx';</script>");
                cleartext();
            }
        }

        catch
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001541", "操作失败!") + "')</script>");
            return;
        }
    }
Exemplo n.º 10
0
    protected void lkbtn_CancleTrue_Click(object sender, EventArgs e)
    {
        string ExpectNum = this.txt_qishu.Value;
        int    num       = ReleaseBLL.Cancel(int.Parse(ExpectNum));

        if (num == 0)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001380", "撤销第") + ExpectNum + GetTran("001381", "期奖金成功!") + "');</script>");
        }

        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001215", "对不起,撤消电子帐户失败,请联系维护人员!") + "');</script>");
        }
        GetShopList();
    }
Exemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceJiesuan); //检查相应权限

        this.addNewQishu.Attributes["onclick"] = "return confirm('" + GetTran("001139", "确认要创建新一期吗?") + "')";
        AjaxPro.Utility.RegisterTypeForAjax(typeof(AjaxClass));
        Translations();
        if (!IsPostBack)
        {
            int MaxQs = ReleaseBLL.GetMaxExpectNum();
            if (MaxQs <= 10)
            {
                this.TextBox1.Text = "1";//结算起始期
                this.TextBox2.Text = Convert.ToString(MaxQs);
            }
            else
            {
                this.TextBox1.Text = Convert.ToString(MaxQs - 10);
                this.TextBox2.Text = Convert.ToString(MaxQs);
            }
            this.Label1.Text = "(" + GetTran("001140", "当前期数为") + "<font color=red>" + MaxQs.ToString() + "</font>," + GetTran("001141", "请输入") + "1-" + MaxQs.ToString() + GetTran("001142", "范围内的整数") + ")";

            this.showTotalQishuLink1();


            //自动结算是否启用
            if (ReleaseDAL.GetzidongjsQy() == "1")
            {
                readerData();
            }
            else
            {
                TextBox5.Enabled      = false; //结算周期文本框
                DropDownList1.Enabled = false; //时 下拉框
                DropDownList2.Enabled = false;
                DropDownList3.Enabled = false;
                Button3.Enabled       = false;
                jszq.Enabled          = false;
                ClientScript.RegisterStartupScript(GetType(), "", "<script>enabledCK();</script>");
            }
        }
        Translations();

        nowtimeid.Text = DateTime.Now.ToString();
    }
Exemplo n.º 12
0
    /// <summary>
    /// 显示所有期数的结算链接。
    /// </summary>
    /// <param name="maxqishu">要显示的期数范围,从1到当前值。</param>
    private void showTotalQishuLink(int startqishu, int maxqishu)
    {
        IList <ConfigModel> list = ReleaseBLL.showTotalQishuLink(startqishu, maxqishu);

        foreach (ConfigModel info in list)
        {
            try
            {
                info.Date = DateTime.Parse(info.Date).AddHours(Convert.ToDouble(Session["WTH"])).ToShortDateString();
            }
            catch
            {
            }
        }
        this.GridView1.DataSource = list;
        this.GridView1.DataBind();
    }
Exemplo n.º 13
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        int StartQishu = 0, EndQishu = 0;

        try
        {
            StartQishu = Convert.ToInt32(this.TextBox1.Text.Trim());
            EndQishu   = Convert.ToInt32(this.TextBox2.Text.Trim());
        }

        catch
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001145", "请输入数字!") + "')</script>");
            return;
        }

        if (StartQishu <= 0 || EndQishu <= 0)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001147", "请输入大于零的整数!") + "')</script>");
            return;
        }

        if (EndQishu > ReleaseBLL.GetMaxExpectNum())
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001150", "不能大于最大期数!") + "')</script>");
            return;
        }

        if (EndQishu == ReleaseBLL.GetMaxExpectNum())
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001150", "不能大于最大期数!") + "')</script>");
            return;
        }

        if (StartQishu <= EndQishu)
        {
            showTotalQishuLink(StartQishu, EndQishu);
        }

        else
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001152", "请正确检查起止顺序!") + "')</script>");
            return;
        }
        Translations();
    }
Exemplo n.º 14
0
 protected void lkbtn_JJGotTrue_Click(object sender, System.EventArgs e)
 {
     Response.Redirect("SalaryGrant.aspx");
     try
     {
         //撤销电子账户
         int num = ReleaseBLL.CancleBonus(Convert.ToInt32(Session["nowqishu"].ToString()));
         if (num == 0)
         {
             Response.Write(Transforms.ReturnAlert(GetTran("001215", "对不起,撤消电子帐户失败,请联系维护人员!")));
         }
         BeginBalanceProg();
     }
     catch
     {
         Response.Write(Transforms.ReturnAlert(GetTran("001215", "对不起,撤消电子帐户失败,请联系维护人员!")));
     }
 }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceHuiDuiChongHong);
        if (!this.IsPostBack)
        {
            if (Request.QueryString["qs"] != null)
            {
                ViewState["qs"]     = Request.QueryString["qs"].ToString();
                ViewState["number"] = Request.QueryString["number"].ToString();

                this.Number.Text = ViewState["number"].ToString();

                this.money.Text = ReleaseBLL.getChongHong(ViewState["number"].ToString(), Convert.ToInt32(ViewState["qs"])).ToString("f2");
            }
        }

        Translations();
    }
Exemplo n.º 16
0
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
            int num = ReleaseBLL.GetOutBonus(int.Parse(e.Row.Cells[0].Text));
            if (num == 1)
            {
                (e.Row.FindControl("CheckBox1") as CheckBox).Checked = true;
            }
        }
        else if (e.Row.RowType == DataControlRowType.Header)
        {
            e.Row.Attributes.Add("style", "background-image:url('images/tabledp.gif')");
        }

        Translations();
    }
Exemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Permissions.ComRedirect(Page, Permissions.redirUrl);
     if (Request.QueryString["type"] != null)
     {
         if (Request.QueryString["ID"] != "")
         {
             int ID = int.Parse(Request.QueryString["ID"]);
             this.DetailSpan.InnerHtml = ReleaseBLL.ChongHongBeizhu(ID);
         }
     }
     else
     {
         if (Request.QueryString["ID"] != "")
         {
             int ID = int.Parse(Request.QueryString["ID"]);
             this.DetailSpan.InnerHtml = ReleaseBLL.DeductReason(ID);
         }
     }
 }
Exemplo n.º 18
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "del")
     {
         Response.Cache.SetExpires(DateTime.Now);
         Permissions.CheckManagePermission(EnumCompanyPermission.FinanceDelTuihui);
         ChangeLogs cl = new ChangeLogs("ChongHong", "ltrim(rtrim(str(ID)))");
         cl.AddRecord(int.Parse(e.CommandArgument.ToString()));
         //获取当前选择的行
         GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
         //删除
         bool blean = ReleaseBLL.DelChongHong(int.Parse(e.CommandArgument.ToString()), double.Parse(row.Cells[4].Text), row.Cells[2].Text);
         if (blean)
         {
             cl.DeletedIntoLogs(ChangeCategory.company17, e.CommandArgument.ToString(), ENUM_USERTYPE.objecttype5);
             Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("000749", "删除成功!") + "')</script>");
         }
         GetShopList();
     }
 }
Exemplo n.º 19
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         e.Row.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
         string    qishu = ((HtmlInputHidden)e.Row.FindControl("HidQishu")).Value;
         HyperLink link  = (HyperLink)e.Row.FindControl("HyperJieSuan");
         System.Web.UI.HtmlControls.HtmlGenericControl div = (System.Web.UI.HtmlControls.HtmlGenericControl)e.Row.FindControl("jiesuan");
         if (ReleaseBLL.IsNotProvideBonus(int.Parse(qishu)) == false)
         {
             div.InnerHtml = "<a href='javascript:openCountWin(" + qishu + ")'>" + GetTran("001154", "结算第") + qishu + GetTran("000157", "期") + "</a>";
         }
         else
         {
             div.InnerHtml = "<a href=\"SalaryGrant.aspx\" onClick=\"return confirm('" + GetTran("000156", "第") + qishu + GetTran("001159", "期有未发放的奖金,请[撤消]后再结算...") + "');\">" + GetTran("001154", "结算第") + qishu + GetTran("000157", "期") + "</a>";
             ReleaseBLL.upProvideState(int.Parse(qishu));
         }
     }
     else if (e.Row.RowType == DataControlRowType.Header)
     {
         e.Row.Attributes.Add("style", "background-image:url('images/tabledp.gif')");
     }
 }
Exemplo n.º 20
0
    protected void reCount_Click(object sender, EventArgs e)
    {
        RunExe myRun = new RunExe();

        myRun.Kill(CommonDataBLL.JiesuanProgramFilename);
        int  a  = CommonDataBLL.UpJstype(ViewState["jsId"].ToString());
        bool re = ReleaseBLL.CheckSetsys();

        if (!re)
        {
            bool res = ReleaseBLL.UpdateSystemID();
            if (!res)
            {
                Response.Write("<meta http-equiv=refresh content=0><script> alert('" + GetTran("001214", "程序停止失败") + "'); </script>");
                return;
            }
            else
            {
                bool r = ReleaseBLL.DelSetsys();
                if (!r)
                {
                    Response.Write("<meta http-equiv=refresh content=0><script> alert('" + GetTran("001214", "程序停止失败") + "'); </script>");
                    return;
                }
            }
        }
        if (a > 0)
        {
            Response.Write("<meta http-equiv=refresh content=0><script> alert('" + GetTran("001212", "程序停止成功") + "'); </script>");
        }
        else
        {
            Response.Write("<meta http-equiv=refresh content=0><script> alert('" + GetTran("001214", "程序停止失败") + "'); </script>");
        }
        Application["jinzhi"] = "F";
    }
Exemplo n.º 21
0
    protected void BeginBalanceProg()
    {
        //检测是否存在没有会员编号的店铺
        int exists = ReleaseBLL.IsNumberExists();

        if (exists > 0)
        {
            Response.Write(Transforms.ReturnAlert(GetTran("001210", "对不起,当前系统中还有店铺没有会员编号,请先在门店管理页面中为这些店添加正确的会员编号!")));
            Application["jinzhi"] = "F";
            Response.End();
        }
        bool re = ReleaseBLL.CheckSetsys();

        if (!re)
        {
            bool r = ReleaseBLL.DelSetsys();
            if (!r)
            {
                ScriptHelper.SetAlert(Page, "系统开关不确定!请先确认系统开关。");
                return;
            }
        }
        if (!ReleaseBLL.GetSystemList())
        {
            ScriptHelper.SetAlert(Page, "系统开关不确定!请先确认系统开关。");
            return;
        }

        bool res = ReleaseBLL.UpdateSystem();

        if (!res)
        {
            ScriptHelper.SetAlert(Page, "系统开关不确定!请先确认系统开关。");
            return;
        }
        RunExe myRun = new RunExe();

        //if (!myRun.IsRun(CommonDataBLL.JiesuanProgramFilename))

        if (ViewState["jsType"].ToString() != "0")
        {
            if (setExeParam())
            {
                if (myRun.RunIt(Server.MapPath("jiesuan\\" + CommonDataBLL.JiesuanProgramFilename + ".exe")))
                {
                    Response.Write("<script>location.href('CompanyBalancerunning.aspx?Qishu=QC888&qs=" + Request.QueryString["qs"] + "&id=" + ViewState["newjsid"].ToString() + "')</script>");
                }
                else
                {
                    Application["jinzhi"] = "F";
                    Response.Write("<script> alert('" + GetTran("001211", "程序启动失败") + "');</script>");
                }
            }
            else
            {
            }
        }
        else
        {
        }
    }
Exemplo n.º 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        //检查相应权限
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan);

        //判断发放期数中是否存在所选期
        int count = ReleaseBLL.IsSuperintendent(Convert.ToInt32(Request.QueryString["qs"]));

        if (count > 0)
        {
            Response.Write("<script>alert('" + GetTran("001204", "发放期数中存在所选期的,请撤销!") + "');window.opener.location='SalaryGrant.aspx';window.close();</script>");
            return;
        }

        //----------------------------------------------

        //-----------------------------------------------

        //RunExe myRun = new RunExe();
        //if (myRun.IsRun(CommonDataBLL.JiesuanProgramFilename))
        DataTable dt = CommonDataBLL.GetJstype();

        if (dt.Rows.Count > 0)
        {
            ViewState["jsType"] = dt.Rows[0]["jstype"].ToString();
            ViewState["jsId"]   = dt.Rows[0]["id"].ToString();

            if (ViewState["jsType"].ToString() == "0")
            {
                this.reCount.Visible    = true;
                this.beginCount.Visible = false;
            }
            else
            {
                this.reCount.Visible    = false;
                this.beginCount.Visible = true;

                messageLabel.Text = GetTran("001205", "点击上面按钮后,请注意提示信息!");
            }
        }
        else
        {
            ViewState["jsType"] = "1";

            this.reCount.Visible    = false;
            this.beginCount.Visible = true;

            messageLabel.Text = GetTran("001205", "点击上面按钮后,请注意提示信息!");
        }


        this.beginCount.Attributes["onclick"] = "bClick(this);";

        if (Request.QueryString["qs"] != null)
        {
            Session["nowqishu"] = Request.QueryString["qs"].Trim();
        }
        else
        {
            this.messageLabel.Text = GetTran("001206", "参数错误!");
            Response.End();
        }
        Translations();
    }
Exemplo n.º 23
0
 /// <summary>
 /// 插入配置表
 /// </summary>
 /// <param name="qishu"></param>
 private void insertConfig(int qishu)
 {
     ReleaseBLL.insertConfig(qishu);
 }
Exemplo n.º 24
0
 /// <summary>
 /// 显示所有期数的结算链接。
 /// </summary>
 /// <param name="maxqishu">要显示的期数范围,从1到当前值。</param>
 private void showTotalQishuLink(int startqishu, int maxqishu)
 {
     this.GridView1.DataSource = ReleaseBLL.showTotalQishuLink(startqishu, maxqishu);
     this.GridView1.DataBind();
 }
Exemplo n.º 25
0
 private void showTotalQishuLink1(int MaxQs)
 {
     this.GridView1.DataSource = ReleaseBLL.GetConfigInfo1(MaxQs);
     this.GridView1.DataBind();
 }
Exemplo n.º 26
0
    private void GetTotal()
    {
        #region "Total"
        double totalIncome = 0.0;
        double totalPayout = 0.0;


        //PV
        if (ViewState["PV"] != null)
        {
            ReleaseBLL.GetPV(Convert.ToInt32(this.DropQiShu1.SelectedValue), Convert.ToInt32(this.DropQiShu2.SelectedValue), out totalPayout, out totalIncome);
        }
        else
        {
            ReleaseBLL.GetBonus(Convert.ToInt32(this.DropQiShu1.SelectedValue), Convert.ToInt32(this.DropQiShu2.SelectedValue), rateNum, out totalIncome, out totalPayout);
        }

        TableRow  tr = new TableRow();
        TableCell myCell;

        myCell                 = new TableCell();
        myCell.Text            = GetTran("001358", "所有期");
        myCell.HorizontalAlign = HorizontalAlign.Center;
        tr.Cells.Add(myCell);

        myCell                 = new TableCell();
        myCell.Text            = "________ ";
        myCell.HorizontalAlign = HorizontalAlign.Center;
        tr.Cells.Add(myCell);

        if (ViewState["PV"] != null)
        {
            myCell                 = new TableCell();
            myCell.Text            = totalIncome.ToString("f0");
            myCell.HorizontalAlign = HorizontalAlign.Right;
            tr.Cells.Add(myCell);

            myCell                 = new TableCell();
            myCell.Text            = totalPayout.ToString("f0");
            myCell.HorizontalAlign = HorizontalAlign.Right;
            tr.Cells.Add(myCell);
        }
        else
        {
            myCell                 = new TableCell();
            myCell.Text            = totalIncome.ToString("C");
            myCell.HorizontalAlign = HorizontalAlign.Right;
            tr.Cells.Add(myCell);

            myCell                 = new TableCell();
            myCell.Text            = totalPayout.ToString("C");
            myCell.HorizontalAlign = HorizontalAlign.Right;
            tr.Cells.Add(myCell);
        }

        double per = 0.0;
        if (totalIncome != 0)
        {
            per = totalPayout * 100 / totalIncome;
        }
        if (per < 0)
        {
            per = 0.0;
        }
        myCell                 = new TableCell();
        myCell.Text            = (per / 100).ToString("P");
        myCell.HorizontalAlign = HorizontalAlign.Center;
        tr.Cells.Add(myCell);

        myCell = new TableCell();
        myCell.HorizontalAlign = HorizontalAlign.Left;
        Image Img = new Image();
        Img.ImageUrl = "images/jsline.gif";
        try
        {
            Img.Width = (int)per;
        }
        catch
        {
        }
        Img.Height = 20;
        myCell.Controls.Add(Img);
        myCell.Height = 25;
        myCell.Width  = 100;
        myCell.Wrap   = false;
        tr.Cells.Add(myCell);

        Table1.Rows.Add(tr);
        #endregion
    }
Exemplo n.º 27
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     rateNum = ReleaseBLL.GetRate(Convert.ToInt32(this.DropCurrency.SelectedValue));
     DropDownList1_SelectedIndexChanged(null, null);
     this.Page.RegisterStartupScript("", "<script>typechange();</script>");
 }
Exemplo n.º 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan, false);
        string Operatenum = CommonDataBLL.OperateBh;
        string Operateip  = CommonDataBLL.OperateIP;
        int    qishu      = 0;

        if (Request.QueryString["qs"] != null)
        {
            qishu = Convert.ToInt32(Request.QueryString["qs"]);
        }
        if (qishu == BLL.CommonClass.CommonDataBLL.GetMaxqishu())
        {
            BlackListBLL.GetSystemClose(Operateip, Operatenum);
        }
        RunExe myRun = new RunExe();

        //if ( myRun.IsRun(  CommonDataBLL.JiesuanProgramFilename  ) )
        if (Request.QueryString["id"] != null)
        {
            ViewState["id"] = Request.QueryString["id"].ToString();
        }
        string jstype = CommonDataBLL.GetJstypeID(ViewState["id"].ToString());

        if (jstype == "0")
        {
            Response.Write("<body bgcolor=#616378><div id='mydiv'>");
            Response.Write("_");
            Response.Write("</div></body>");
            Response.Write("<script>mydiv.innerText = '';</script>");
            Response.Write("<script language=javascript>;");
            Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");
            Response.Write("{var output; output = '" + GetTran("001234", "程序正在运行") + "';dots++;if(dots>=dotmax)dots=1;");
            Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText =  output;}");
            Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; ");
            Response.Write("window.setInterval('ShowWait()',1000);}");
//				Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';");
//				Response.Write("window.clearInterval();}");
            Response.Write("StartShowWait();</script>");
            Response.Write("<script>window.setTimeout('location=location',5000)</script>");
            Response.Flush();
            Thread.Sleep(10000);
        }
        else
        {
            string cuowu = "";
            //是否有错误单子
            //int err = ReleaseBLL.IsErrorOrder(Convert.ToInt32(Session["nowqishu"].ToString()));
            Application["jinzhi"] = "F";
            bool re = ReleaseBLL.CheckSetsys();
            if (!re)
            {
                bool res = ReleaseBLL.UpdateSystemID();
                if (res)
                {
                    bool r = ReleaseBLL.DelSetsys();
                }
            }
            //if ( err>0 )
            //{
            //    cuowu = GetTran("001235", "但是本期中有错误单子。");
            //}
            if (jstype == "1")
            {
                cuowu = "正常结束。";
            }
            else if (jstype == "2")
            {
                cuowu = "错误报单结束。";
            }
            else if (jstype == "3")
            {
                cuowu = "异常结束。";
            }
            else
            {
                cuowu = "未启动。";
            }

            //if (cuowu == "")
            if (jstype == "1")
            {
                ReleaseBLL.UPConfigflag(int.Parse(Request.QueryString["qs"]));
            }
            ReleaseBLL.UPConfigNum(int.Parse(Request.QueryString["qs"]));
            Response.Write("<script language='javascript'> alert('" + GetTran("001236", "程序运行完毕!") + cuowu + "');window.close()</script>");
        }
        if (qishu == BLL.CommonClass.CommonDataBLL.GetMaxqishu())
        {
            BlackListBLL.GetSystemOpen(Operateip, Operatenum);
        }
    }
Exemplo n.º 29
0
    public void getBalanceToPurseDetail()
    {
        string Number = DisposeString.DisString(this.Number.Text.Trim());
        string Name   = Encryption.Encryption.GetEncryptionName(DisposeString.DisString(this.Name.Text.Trim()));

        bool blean = ReleaseBLL.IsProvide(Convert.ToInt32(ViewState["qs"].ToString()));

        if (blean)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(" 1=1 and b.number=m.number and b.isyxj=1 and b.ExpectNum=" + ViewState["qs"].ToString());
            if (Number.Length > 0)
            {
                sb.Append(" and b.Number like'%" + Number + "%'");
            }
            if (Name.Length > 0)
            {
                sb.Append(" and m.Name like'%" + Name + "%'");
            }

            ViewState["SQLSTR"] = "SELECT b.*,m.name FROM BalanceToPurseDetail b,memberinfo m WHERE " + sb.ToString() + " isyxj=1 order by b.id desc";
            string asg   = ViewState["SQLSTR"].ToString();
            Pager  pager = Page.FindControl("Pager1") as Pager;
            pager.Pageindex    = 0;
            pager.PageSize     = 10;
            pager.PageTable    = "BalanceToPurseDetail b,memberinfo m";
            pager.Condition    = sb.ToString();
            pager.PageColumn   = " b.*,m.name ";
            pager.ControlName  = "GridView1";
            pager.key          = " b.id ";
            pager.InitBindData = true;
            pager.PageBind();
        }
        else
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(" 1=1 and b.number=m.number and b.isyxj=1 and b.ExpectNum=" + ViewState["qs"].ToString());
            if (Number.Length > 0)
            {
                sb.Append(" and b.Number like'%" + Number + "%'");
            }
            if (Name.Length > 0)
            {
                sb.Append(" and m.Name like'%" + Name + "%'");
            }
            ViewState["SQLSTR"] = "SELECT b.Number,b.CurrentOneMark,b.Bonus1,b.Bonus2,b.Bonus3,b.Bonus4,b.Bonus5,b.Bonus6,b.Bonus7,b.Bonus8,b.DeductTax as Total,b.CurrentSolidSend,m.name, b.ExpectNum as ExpectNum,'" + DateTime.Now.ToUniversalTime() + "' as TransferToPurseDate,0 as bqbukuan FROM BalanceToPurseDetail b,memberinfo m WHERE " + sb.ToString() + " order by m.id desc";
            string asg   = ViewState["SQLSTR"].ToString();
            Pager  pager = Page.FindControl("Pager1") as Pager;
            pager.Pageindex    = 0;
            pager.PageSize     = 10;
            pager.PageTable    = " BalanceToPurseDetail b,memberinfo m";
            pager.Condition    = sb.ToString();
            pager.PageColumn   = " b.Number,b.CurrentOneMark,b.Bonus1,b.Bonus2,b.Bonus3,b.Bonus4,b.Bonus5,b.Bonus6,b.Bonus7,b.Bonus8,b.DeductTax as Total,b.CurrentSolidSend,m.name,b.ExpectNum as ExpectNum,'" + DateTime.Now.ToUniversalTime() + "' as TransferToPurseDate,0 as bqbukuan  ";
            pager.ControlName  = "GridView1";
            pager.key          = " b.id ";
            pager.InitBindData = true;
            pager.PageBind();
        }

        Translations();
    }
Exemplo n.º 30
0
    public void Graph()
    {
        rateNum = ReleaseBLL.GetRate(Convert.ToInt32(this.DropCurrency.SelectedValue));
        string vqs = Request["qs"];

        if (vqs == null) // 收支走势图
        {
            this.td1.Visible     = true;
            this.GO_Back.Visible = false;
            this.Label1.Text     = GetTran("001323", "收支走势图");
            int hang, lie;

            if (Convert.ToInt32(this.DropQiShu2.SelectedValue) < Convert.ToInt32(this.DropQiShu1.SelectedValue))
            {
                msg = "<script>alert('终止期数必须大于等于起始期数!');</script>";
                return;
            }
            hang             = Convert.ToInt32(this.DropQiShu2.SelectedValue) - Convert.ToInt32(this.DropQiShu1.SelectedValue) + 1 + 1; // 加1是因为第1行为标题所占用
            lie              = 6;                                                                                                       // 总共6列
            string[,] zoushi = new string[hang, lie];
            // 初始化
            for (int m = 0; m < hang; m++)
            {
                for (int n = 0; n < lie; n++)
                {
                    zoushi[m, n] = "";
                }
            }
            // 赋值-标题-总共6列
            zoushi[0, 0] = GetTran("000045", "期数");
            zoushi[0, 1] = GetTran("001360", "细节");
            if (ViewState["PV"] != null)
            {
                zoushi[0, 2] = GetTran("001324", "总收入PV");
                zoushi[0, 3] = GetTran("001325", "总支出(PV)");
            }
            else
            {
                zoushi[0, 2] = GetTran("001327", "总收入(元)");
                zoushi[0, 3] = GetTran("001328", "总支出(元)");
            }
            zoushi[0, 4] = GetTran("001329", "拨出率(%)");
            zoushi[0, 5] = GetTran("001330", "拨出率走势");


            ////是显示pv还是金额
            IList <BochulvModel> list = null;


            if (ViewState["PV"] != null)
            {
                list = ReleaseBLL.GetTotalPV(this.DropQiShu1.SelectedValue, this.DropQiShu2.SelectedValue);
            }
            else
            {
                list = ReleaseBLL.GetTotalBonus(rateNum, this.DropQiShu1.SelectedValue, this.DropQiShu2.SelectedValue);
            }

            int num = 0;
            foreach (BochulvModel info in list)
            {
                num++;
                zoushi[num, 0] = info.ExpectNum.ToString();
                zoushi[num, 1] = "FinanceStat.aspx?qs=" + info.ExpectNum.ToString();
                zoushi[num, 3] = (Convert.ToDouble(info.TotalBonus)).ToString("f2");
                zoushi[num, 2] = (Convert.ToDouble(info.Totalmoney)).ToString("f2");

                double a = Convert.ToDouble(info.TotalBonus);
                double b = Convert.ToDouble(info.Totalmoney);
                double c = 0.0;
                if (b == 0)
                {
                    c = 0;
                }
                else
                {
                    c = a * 100 / b;
                }

                if (c <= 0)
                {
                    zoushi[num, 4] = "0";
                    zoushi[num, 5] = "0";
                }
                else
                {
                    zoushi[num, 4] = Convert.ToDouble(Math.Round(c, 2).ToString()).ToString("f2");
                    zoushi[num, 5] = Convert.ToDouble(Math.Round(c, 2).ToString()).ToString("f2");
                }
            }

            zoushi[hang - 1, 0] = DropQiShu2.SelectedValue;                                // 期数。
            zoushi[hang - 1, 1] = "FinanceStat.aspx?qs=" + this.DropQiShu2.SelectedValue;  // 连接,根据期数参数来显示详细信息。
            // 从数据库读取并处理,tempmoney
            double CurrentSolidSend = 0;
            double CurrentOneMoney  = 0;
            int    ExpectNum        = Convert.ToInt32(this.DropQiShu2.SelectedValue);
            if (ExpectNum == CommonDataBLL.getMaxqishu())
            {
                //PV
                if (ViewState["PV"] != null)
                {
                    ReleaseBLL.GetCurrentPV(ExpectNum, out CurrentSolidSend, out CurrentOneMoney);
                }
                else
                {
                    ReleaseBLL.GetTotalMoney(rateNum, ExpectNum, out CurrentSolidSend, out CurrentOneMoney);
                }
            }

            // 给数据赋值
            // 总支出
            zoushi[hang - 1, 3] = CurrentSolidSend.ToString();
            if (zoushi[hang - 1, 3] == String.Empty)
            {
                zoushi[hang - 1, 3] = "0";
            }

            // 总收入/拨出率/走势图
            zoushi[hang - 1, 2] = CurrentOneMoney.ToString();
            if (zoushi[hang - 1, 2] == String.Empty)
            {
                zoushi[hang - 1, 2] = "0";
            }
            if (zoushi[hang - 1, 2] == "0")
            {
                zoushi[hang - 1, 4] = "0";
                zoushi[hang - 1, 5] = "0";
            }
            else
            {
                double a = Convert.ToDouble(zoushi[hang - 1, 3]);
                double b = Convert.ToDouble(zoushi[hang - 1, 2]);
                double c = 0.0;
                if (b == 0)
                {
                    c = 0;
                }
                else
                {
                    c = a * 100 / b;
                }

                if (c <= 0)
                {
                    zoushi[hang - 1, 4] = "0";
                    zoushi[hang - 1, 5] = "0";
                }
                else
                {
                    zoushi[hang - 1, 4] = Convert.ToDouble(Math.Round(c, 2).ToString()).ToString("f2");
                    zoushi[hang - 1, 5] = Convert.ToDouble(Math.Round(c, 2).ToString()).ToString("f2");
                }
            }
            //}
            for (int m = 0; m < hang; m++)
            {
                TableRow myRow2 = new TableRow();
                for (int i = 0; i < lie; i++)
                {
                    TableCell myCell = new TableCell();
                    if (m == 0) // 标题行-第0行
                    {
                        #region
                        switch (i)
                        {
                        case 0:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 1:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 2:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 3:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 4:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 5:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;
                        }
                        myCell.Style.Add("background-image", "images/tabledp.gif");
                        myCell.ForeColor = System.Drawing.Color.White;
                        #endregion
                    }
                    else     // 数据行-第1行以后
                    {
                        #region
                        switch (i)// 区分不同的显示,此处第一列为超级连接,最后以列为图形,其他为文字
                        {
                        case 0:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 1:
                            HyperLink HP = new HyperLink();
                            HP.Text        = GetTran("000399", "查看详细");
                            HP.NavigateUrl = zoushi[m, i].ToString();
                            myCell.Controls.Add(HP);

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 4:

                            myCell.Text = (Convert.ToDouble(zoushi[m, i]) / 100).ToString("P");

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 5:
                            int   a   = Convert.ToInt32(Convert.ToDouble(zoushi[m, 4]));
                            Image Img = new Image();
                            Img.ImageUrl = "images/jsline.gif";

                            if (a <= 0)
                            {
                                a = 0;
                            }
                            Img.Width  = a;
                            Img.Height = 20;
                            myCell.Controls.Add(Img);

                            myCell.HorizontalAlign = HorizontalAlign.Left;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        default:

                            if (ViewState["PV"] != null)
                            {
                                myCell.Text = String.Format("{0:f0}", Convert.ToDecimal(zoushi[m, i]));
                            }
                            else
                            {
                                myCell.Text = String.Format("{0:f2}", Convert.ToDecimal(zoushi[m, i]));
                            }

                            myCell.HorizontalAlign = HorizontalAlign.Right;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;
                        }
                        #endregion
                    }
                }

                myRow2.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
                myRow2.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
                this.Table1.Rows.Add(myRow2);
            }

            GetTotal();
        }
        else // 详细信息
        {
            this.td1.Visible = false;
            this.Label1.Text = GetTran("000156", "第 ") + vqs.ToString() + GetTran("001337", " 期奖金收支详图");
            int hang, lie;
            hang = 2;
            //7;					  // 总共是多少项奖金就是奖金数+1
            lie = 5;                                             // 总共4列,分别是奖金名、奖金数额、拨出率、拨出率图
            string[,] zoushi = new string[hang, lie];
            // 初始化
            for (int m = 0; m < hang; m++)
            {
                for (int n = 0; n < lie; n++)
                {
                    zoushi[m, n] = "";
                }
            }
            // 赋值-标题-总共6列
            zoushi[0, 0] = GetTran("000012", "序号");
            zoushi[0, 1] = GetTran("000243", "奖金");

            zoushi[0, 2] = GetTran("001346", "数额");
            zoushi[0, 3] = GetTran("001329", "拨出率(%)");
            zoushi[0, 4] = GetTran("001351", "拨出率图");  // 不显示

            //模板的代码

            //zoushi[1, 1] = "无";
            zoushi[1, 1] = "业绩奖";
            //zoushi[2, 1] = "回本奖";
            //zoushi[3, 1] = "大区奖";
            //zoushi[4, 1] = "小区奖";
            //zoushi[5, 1] = "永续奖";
            //zoushi[6, 1] = "进步奖";
            //zoushi[7, 1] = "网平台综合管理费";
            //zoushi[8, 1] = "网扣福利奖金";
            //zoushi[9, 1] = "网扣重复消费";

            //zoushi[1, 4] = "Bonus0";
            zoushi[1, 4] = "Bonus0";
            //zoushi[2, 4] = "Bonus2";
            //zoushi[3, 4] = "Bonus3";
            //zoushi[4, 4] = "Bonus4";
            //zoushi[5, 4] = "Bonus5";
            //zoushi[6, 4] = "Bonus6";
            //zoushi[7, 4] = "Kougl";
            //zoushi[8, 4] = "Koufl";
            //zoushi[9, 4] = "Koufx";



            double moneyZongShouRu = 1;
            string[,] zoushi1 = new string[hang, lie];
            ReleaseBLL.GetOneBonus(rateNum, int.Parse(vqs), hang, zoushi, out zoushi1, out moneyZongShouRu);
            zoushi = zoushi1;

            for (int m = 1; m < hang; m++)
            {
                for (int n = 0; n < lie - 1; n++)
                {
                    if (n == 3 || n == 4)
                    {
                        double a = Convert.ToDouble(zoushi[m, 2]);
                        double c = 0;

                        if (moneyZongShouRu == 0)
                        {
                            c = 0;
                        }
                        else
                        {
                            c = a * 100 / moneyZongShouRu;
                        }

                        if (c < 0)
                        {
                            c = 0;
                        }


                        zoushi[m, n] = c.ToString();
                    }
                    else
                    {
                        if (zoushi[m, n] == String.Empty)
                        {
                            zoushi[m, n] = "0";
                        }
                    }
                }
            }

            for (int m = 0; m < hang; m++)
            {
                TableRow myRow2 = new TableRow();
                for (int i = 0; i < lie; i++)
                {
                    TableCell myCell = new TableCell();
                    if (m == 0) // 标题行-第0行
                    {
                        myCell.Text            = zoushi[m, i].ToString();
                        myCell.Height          = 25;
                        myCell.HorizontalAlign = HorizontalAlign.Center;
                        myCell.Wrap            = false;
                        myCell.Style.Add("background-image", "images/tabledp.gif");
                        myCell.ForeColor = System.Drawing.Color.White;
                        myRow2.Cells.Add(myCell);
                    }
                    else           // 数据行-第1行以后
                    {
                        switch (i) // 区分不同的显示,此处第一列为超级连接,最后以列为图形,其他为文字
                        {
                        case 4:
                            int a = 0;
                            try
                            {
                                a = Convert.ToInt32(Convert.ToDouble(zoushi[m, 3]));
                            }
                            catch
                            {
                                a = 0;
                            }

                            Image Img = new Image();
                            Img.ImageUrl = "images/jsline.gif";
                            try
                            {
                                Img.Width = a;
                            }

                            catch
                            {
                                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + a.ToString() + "')</script>");
                            }
                            Img.Height = 20;
                            myCell.Controls.Add(Img);

                            myCell.Wrap = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 3:
                            myCell.Text = (Convert.ToDouble(zoushi[m, i]) / 100).ToString("P");

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 2:
                            myCell.Text = (Convert.ToDecimal(zoushi[m, i])).ToString("f2");

                            myCell.HorizontalAlign = HorizontalAlign.Right;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        case 1:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;

                        default:
                            myCell.Text = zoushi[m, i].ToString();

                            myCell.HorizontalAlign = HorizontalAlign.Center;
                            myCell.Wrap            = false;
                            myRow2.Cells.Add(myCell);
                            break;
                        }
                    }
                }
                myRow2.Attributes.Add("onmouseover", "bg=this.style.backgroundColor;this.style.backgroundColor='#FFFFCC'");
                myRow2.Attributes.Add("onmouseout", "this.style.backgroundColor=bg");
                this.Table1.Rows.Add(myRow2);
            }
        }
    }