private void DeleteDetails(string sql) { InvtBatchCAP_DetailsCollection oDetailList = InvtBatchCAP_Details.LoadCollection(sql); foreach (InvtBatchCAP_Details oDetail in oDetailList) { oDetail.Delete(); } }
private decimal GetTotalRequiredQty() { decimal totalQty = 0; string sql = "HeaderId = '" + this.CAPHeaderId.ToString() + "'"; InvtBatchCAP_DetailsCollection oDetails = InvtBatchCAP_Details.LoadCollection(sql); foreach (InvtBatchCAP_Details oDetail in oDetails) { totalQty += oDetail.Qty; } return(totalQty); }
private decimal GetTotalAmount() { decimal totalAmt = 0; string sql = "HeaderId = '" + this.CAPHeaderId.ToString() + "'"; InvtBatchCAP_DetailsCollection oDetails = InvtBatchCAP_Details.LoadCollection(sql); foreach (InvtBatchCAP_Details oDetail in oDetails) { decimal xchgRate = Convert.ToDecimal(DAL.Common.Utility.IsNumeric(txtExchgRate.Text) ? txtExchgRate.Text.Trim() : "1"); totalAmt += oDetail.UnitAmount * oDetail.Qty; } return(totalAmt); }