public List<Proforma_Binding> Get_Collection(int ID) { List<Proforma_Binding> _List_Collection = new List<Proforma_Binding>(); DataTable dt = Proforma_Binding_DA.Get_Collection(ID); foreach (DataRow row in dt.Rows) { Proforma_Binding _Proforma_Binding = new Proforma_Binding(); _Proforma_Binding.ID = int.Parse(row["ID"].ToString()); _Proforma_Binding.Proforma_Invoice_ID = int.Parse(row["Proforma_Invoice_ID"].ToString()); _Proforma_Binding.Proforma_Invoice_No = row["Pi_No"].ToString(); _List_Collection.Add(_Proforma_Binding); } return _List_Collection; }
public Proforma_Binding Get_Proforma_Binding(int ID) { // Customer Detail Proforma_Binding _Proforma_Binding = new Proforma_Binding(); DataTable dt = Proforma_Binding_DA.Get_Proforma_Binding(ID); _Proforma_Binding.Custom_Invoice_ID = int.Parse(dt.Rows[0]["Custom_Invoice_ID"].ToString()); _Proforma_Binding.Custom_Invoice_No = dt.Rows[0]["Custom_Invoice_No"].ToString(); _Proforma_Binding.Customer_ID = int.Parse(dt.Rows[0]["Customer_ID"].ToString()); return _Proforma_Binding; }