public static PaymentHistoryEntity getByPayId(int payId) { DataRow dr = DbHelper.ExecuteDataRow("p_PaymentHistory_getByPayId", payId); PaymentHistoryEntity _paymentHistory = new PaymentHistoryEntity(); if (dr != null) { _paymentHistory.PayId = payId; _paymentHistory.Amount = Convert.ToDecimal(dr["amount"]); _paymentHistory.CompanyId = Convert.ToInt32(dr["companyId"]); _paymentHistory.Status =dr["status"].ToString(); _paymentHistory.Type = dr["type"].ToString(); _paymentHistory.PayMethod = dr["payMethod"].ToString(); _paymentHistory.StartDt = Convert.ToDateTime(dr["startDt"]); _paymentHistory.EndDt = Convert.ToDateTime(dr["endDt"]); if (dr["createDt"] != DBNull.Value) _paymentHistory.CreateDt = Convert.ToDateTime(dr["createDt"]); if (dr["adminId"] != DBNull.Value) _paymentHistory.AdminId = Convert.ToInt32(dr["adminId"]); if (dr["updateStatusDt"] != DBNull.Value) _paymentHistory.UpdateStatusDt = Convert.ToDateTime(dr["updateStatusDt"]); if (dr["orderCount"] != DBNull.Value) _paymentHistory.OrderCount = Convert.ToInt32(dr["orderCount"]); if (dr["deductMoney"] != DBNull.Value) _paymentHistory.DeductMoney = Convert.ToDecimal(dr["deductMoney"]); if (dr["defaultDue"] != DBNull.Value) _paymentHistory.DefaultDue = Convert.ToInt32(dr["defaultDue"]); } return _paymentHistory; }
public static void update(PaymentHistoryEntity paymentHistory) { DbHelper.ExecuteNonQuery("p_PaymentHistory_update", paymentHistory.PayId, paymentHistory.Status, paymentHistory.AdminId); }
public static void update(PaymentHistoryEntity payH) { PaymentHistory.update(payH); }
protected void rpt_list_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Extend") { int payId = Convert.ToInt32(e.CommandArgument); hid_PayId.Value = payId.ToString(); showExtendDay(); win_Extend.Show(); } else if (e.CommandName == "upadateStatus") { int payId = Convert.ToInt32(e.CommandArgument); PaymentHistoryEntity phe = new PaymentHistoryEntity(); phe.AdminId = logic.sysAdmin.AdminID; phe.Status = "2"; //确认收款 phe.PayId = payId; logic.paymentHistory.update(phe); rptBind(); Library.Script.ClientMsg("已经成功更新!"); } else if (e.CommandName == "Details") { AspNetPager2.CurrentPageIndex = 1; int payId = Convert.ToInt32(e.CommandArgument); PaymentHistoryEntity _phe = logic.paymentHistory.getByPayId(payId); hid_companyId.Value = _phe.CompanyId.ToString(); hid_startDt.Value = _phe.StartDt.ToString(); hid_endDt.Value = _phe.EndDt.ToString(); hid_PayId.Value = payId.ToString(); rptOrderItemBind(payId); orderItem.Show(); } }