using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using xabaraCOM;

public partial class WebXabara_money_ConsumeDetail : System.Web.UI.Page
{
    sqlServer sql = new sqlServer();
    admin a = new admin();

    protected void Page_Load(object sender, EventArgs e)
    {
        a.check("|money|");

        if (!IsPostBack)
        {
            string searchWordTemp = Server.UrlDecode(xabara.safeSql(Request["keyWords"]));
            string strSql = string.Empty;
            string ifStr = string.Empty;
            if (!string.IsNullOrEmpty(searchWordTemp as string))
            {
                ifStr += " and (uID ='" + searchWordTemp + "' or orderID ='" + searchWordTemp + "')";
            }

            strSql += "select * from moneyDetail where 1=1" + ifStr + " order by dID desc";
            //Response.Write(strSql);
            lblCurrentPage.Text = sql.RepeaterDB(RepeaterList, strSql, "&keyWords=" + Server.UrlEncode(searchWordTemp), 20, "page", "center", true);
        }
    }

    public string getM(string str)
    {
        string returnStr = string.Empty;
        if (Convert.ToDouble(str) > 0)
        {
            returnStr = rmb.format(str);
        }
        return returnStr;
    }

    protected void SearchButton_Click(object sender, EventArgs e)
    {
        Response.Redirect("consumeDetail.aspx?keyWords=" + Server.UrlEncode(searchWord.Text.Trim()), true);
    }
}
