示例#1
0
        /// <summary>
        /// 数据导出
        /// </summary>
        public void ExportExcel(string keywords, int Stuts, string StartTime, string EndTime)
        {
            Am_UserGetMoneyToBankBll bll = new Am_UserGetMoneyToBankBll();
            var ListData = bll.GetPageList(keywords, Stuts, StartTime, EndTime);
            var newlist  = new List <Am_UserGetMoneyToBankNew>();

            foreach (var item in ListData)
            {
                var model = new Am_UserGetMoneyToBankNew();
                model.BankAddress = item.BankAddress;
                model.BankCharge  = item.BankCharge.Value.ToString("0.00");
                model.BankCode    = item.BankCode;
                model.BankName    = item.BankName;
                model.CreateTime  = item.CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                model.Money       = item.Money.Value.ToString("0.00");
                model.PayTime     = item.PayTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                model.RealMoney   = item.RealMoney.Value.ToString("0.00");
                model.Remark      = item.Remark;
                model.StatusStr   = item.StatusStr;
                model.UserName    = item.UserName;
                model.U_Name      = item.U_Name;

                newlist.Add(model);
            }
            string[] columns = new string[] { "用户名:UserName", "姓名:U_Name", "提现金额:Money",
                                              "手续费:BankCharge", "实际到账:RealMoney", "银行名称:BankName",
                                              "银行卡号:BankCode", "开户行:BankAddress", "状态:StatusStr", "提现时间:CreateTime", "支付时间:PayTime", "备注:Remark" };
            DeriveExcel.ListToExcel <Am_UserGetMoneyToBankNew>(newlist, columns, "提现列表" + DateTime.Now.ToString("yyyyMMddHHmmss"));
        }
示例#2
0
 /// <summary>
 /// 搜索
 /// </summary>
 /// <returns></returns>
 public ActionResult GridPageListJson(JqGridParam jqgridparam, string keywords, int Stuts, string StartTime, string EndTime)
 {
     try
     {
         Stopwatch watch = CommonHelper.TimerStart();
         Am_UserGetMoneyToBankBll bll = new Am_UserGetMoneyToBankBll();
         var ListData = bll.GetPageList(ref jqgridparam, keywords, Stuts, StartTime, EndTime);
         var JsonData = new
         {
             total    = jqgridparam.total,
             page     = jqgridparam.page,
             records  = jqgridparam.records,
             costtime = CommonHelper.TimerEnd(watch),
             rows     = ListData
         };
         return(Content(JsonData.ToJson()));
     }
     catch (Exception ex)
     {
         Base_SysLogBll.Instance.WriteLog("", OperationType.Query, "-1", "异常错误:" + ex.Message);
         return(null);
     }
 }