/// <summary> /// 根据收款单据ID查询认领明细 /// </summary> /// <param name="collcetingID"></param> /// <returns></returns> private void LoadClaimDetail(int collcetingID) { To_ClaimManager claimManager = new To_ClaimManager(); To_ClaimDetailManager claimDetailManager = new To_ClaimDetailManager(); string claimId = claimManager.GetFiledValue(collcetingID, "ID"); if (claimId != "") { RpClaimDetail.DataSource = claimDetailManager.GetHasDetail(" claimID=" + claimId); RpClaimDetail.DataBind(); } }
/// <summary> /// 加载已经认领过的认领明细数据 /// </summary> /// <param name="claimId"></param> private void LoadClaimDetail(string claimId) { To_ClaimDetailManager claimDetailManager = new To_ClaimDetailManager(); DataTable dt = claimDetailManager.GetHasDetail("claimID = " + claimId); this.RpClaimDetailList.DataSource = dt; this.RpClaimDetailList.DataBind(); double hasSum = 0.00; for (int i = 0; i < dt.Rows.Count; i++) { hasSum += Convert.ToDouble(dt.Rows[i]["realAmount"]); } this.hasSumBox.InnerText = hasSum.ToString("F2"); }
/// <summary> /// 取消认领 /// </summary> /// <param name="id"></param> private void CancelClaim(int id) { To_ClaimManager b_claim = new To_ClaimManager(); To_ClaimDetailManager b_claimDetail = new To_ClaimDetailManager(); string claimID = b_claim.GetID(id); DataTable dt = b_claimDetail.GetHasDetail(" claimID=" + claimID); if (claimID != "" && b_claim.Delete(int.Parse(claimID))) { b_claimDetail.DeleteByClaim(claimID); } To_CollectingManager.ChangeClaim(id, 0); UpdateOrderColect(dt); }