private Bill ConvertToObject(DataRow row) { Bill obj = new Bill(); try { obj.FCr = Convert.ToDecimal(row["FCr"]); } catch (Exception ex) { } return obj; }
public DataTable DALGetGRNMaterial(Bill objBill) { DataTable dt = new DataTable(); try { SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "GetOutstandingBill"; oSqlCommand.Parameters.AddWithValue("@SupplierID", objBill.SupplierID); oSqlCommand.CommandText = SqlQuery; dt = new DALBase().SelectSPMRP(oSqlCommand); dt.TableName = "tblpendingpayablebill"; } catch (Exception ex) { } return dt; }
public List<Bill> BALGetFinalCreditor(Bill objBill) { List<Bill> listobj = new List<Bill>(); DataTable dt = new DataTable(); try { DALBill objDALBill = new DALBill(); dt = objDALBill.DALGetGRNMaterial(objBill); for (int i = 0; i < dt.Rows.Count; i++) { listobj.Add(ConvertToObject(dt.Rows[i])); } } catch (Exception ex) { } return listobj; }