Exemplo n.º 1
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.º 2
0
 /// <summary>
 /// 添加“工资退回”
 /// update h_info set zongji=zongji+100,ectzongji=ectzongji+100 where bianhao='a00001'
 /// insert into chonghong (bianhao,qishu,jine,beizhu,isdele) values ('a00001',2,100,'给你发钱了 你高兴了吧',0)
 /// </summary>
 /// <returns></returns>
 public static Boolean AddChongHong(ChongHongModel chonghong)
 {
     return(ReleaseDAL.AddChongHong(chonghong));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 条件查询
 /// select * from ChongHong where isdele=0 and bianhao like '%a00001%' and qishu=2 and cast (jine as varchar (20)) like '%10%'
 /// </summary>
 public List <ChongHongModel> GetChongHong(ChongHongModel chonghong)
 {
     return(null);
 }