Exemple #1
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();
    }
Exemple #2
0
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        //if (IsProcessExist("ds2010.exe"))
        //{
        //    ClientScript.RegisterStartupScript(this.GetType(), "success", "alert('" + GetTran("007165", "奖金正在结算……") + "');", true);
        //    return;
        //}

        //获取最后一次结算状态
        DataTable dt = CommonDataBLL.GetJstype();

        if (dt.Rows.Count > 0)
        {
            if (dt.Rows[0]["jstype"].ToString() == "0")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "success", "alert('" + GetTran("007165", "奖金正在结算……") + "');", true);
                GetShopList();
                return;
            }
        }

        if (e.CommandName == "add_jj")
        {
            string qishu = e.CommandArgument.ToString();
            bool   blean = ReleaseBLL.IsProvide(int.Parse(qishu));
            if (blean)
            {
                Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001374", "对不起,该期奖金已经写入用户电子帐户!") + "');</script>");
                GetShopList();
                return;
            }
            else
            {
                bool b = ReleaseBLL.Provide(int.Parse(qishu));
                if (b)
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001375", "写入成功!") + "');</script>");
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('" + GetTran("001376", "对不起,写入电子帐户失败,请联系维护人员!") + "');</script>");
                }
            }
            GetShopList();
        }
        if (e.CommandName == "cancle_jj")
        {
            string ExpectNum = e.CommandArgument.ToString();
            bool   blean     = ReleaseBLL.IsProvide(int.Parse(ExpectNum));
            if (!blean)
            {
                ScriptHelper.SetAlert(Page, "奖金已撤销!");
                GetShopList();
                return;
            }
            else
            {
                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();
        }

        if (e.CommandName == "add_View")
        {
            string qishu = e.CommandArgument.ToString();
            Response.Redirect("SalaryGrantView.aspx?qs=" + qishu);
        }
    }