/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_order_audit model) { return(dal.Update(model)); }
/// <summary> /// 获得数据列表 /// </summary> public List <JMP.MDL.jmp_order_audit> DataTableToList(DataTable dt) { List <JMP.MDL.jmp_order_audit> modelList = new List <JMP.MDL.jmp_order_audit>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { JMP.MDL.jmp_order_audit model; for (int n = 0; n < rowsCount; n++) { model = new JMP.MDL.jmp_order_audit(); if (dt.Rows[n]["id"].ToString() != "") { model.id = int.Parse(dt.Rows[n]["id"].ToString()); } if (dt.Rows[n]["order_amount"].ToString() != "") { model.order_amount = decimal.Parse(dt.Rows[n]["order_amount"].ToString()); } if (dt.Rows[n]["created_on"].ToString() != "") { model.created_on = DateTime.Parse(dt.Rows[n]["created_on"].ToString()); } if (dt.Rows[n]["is_processed"].ToString() != "") { model.is_processed = int.Parse(dt.Rows[n]["is_processed"].ToString()); } if (dt.Rows[n]["processed_time"].ToString() != "") { model.processed_time = DateTime.Parse(dt.Rows[n]["processed_time"].ToString()); } model.processed_by = dt.Rows[n]["processed_by"].ToString(); model.processed_result = dt.Rows[n]["processed_result"].ToString(); model.order_code = dt.Rows[n]["order_code"].ToString(); model.order_table_name = dt.Rows[n]["order_table_name"].ToString(); if (dt.Rows[n]["app_id"].ToString() != "") { model.app_id = int.Parse(dt.Rows[n]["app_id"].ToString()); } model.message = dt.Rows[n]["message"].ToString(); model.trade_no = dt.Rows[n]["trade_no"].ToString(); if (dt.Rows[n]["payment_time"].ToString() != "") { model.payment_time = DateTime.Parse(dt.Rows[n]["payment_time"].ToString()); } if (dt.Rows[n]["payment_amount"].ToString() != "") { model.payment_amount = decimal.Parse(dt.Rows[n]["payment_amount"].ToString()); } model.payment_status = dt.Rows[n]["payment_status"].ToString(); if (dt.Rows[n]["message_send_time"].ToString() != "") { model.message_send_time = DateTime.Parse(dt.Rows[n]["message_send_time"].ToString()); } if (dt.Rows[n]["is_send_message"].ToString() != "") { model.is_send_message = int.Parse(dt.Rows[n]["is_send_message"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(JMP.MDL.jmp_order_audit model) { dal.Add(model); }