public DataTable GetTableData(string strPartyName, string strBillNo, string strBOENo) { DataTable dt = new DataTable(); tblGetTableDataTableAdapter adp = new tblGetTableDataTableAdapter(); dt = adp.GetTableData(strPartyName, Convert.ToInt32(strBillNo), strBOENo); return(dt); }
public double GetTotal(string strPartyName, string strBillNo, string strBOENo) { tblGetTableDataTableAdapter adp = new tblGetTableDataTableAdapter(); double total = 0; foreach (var x in adp.GetTableData(strPartyName, Convert.ToInt32(strBillNo), strBOENo)) { total += x.monTotalPrice; } Int64 amount_int = (Int64)total; Int64 amount_dec = (Int64)Math.Round((total - (double)(amount_int)) * 100); total = amount_int + ((double)(amount_dec) / 100); return(total); }