public static void FillDataSet(DataSet dataSet) { if (!dataSet.Tables.Contains("Table_PayRent")) { Dal.FillDataSet(dataSet, "Table_PayRent", "[ID]"); OrderRent_DAL.FillDataSet(dataSet); DataRelation dataRelation = null; dataRelation = new DataRelation("PayRentOrderRent", dataSet.Tables["Table_OrderRent"].Columns["Id"], dataSet.Tables["Table_PayRent"].Columns["OrderRent"]); dataSet.Relations.Add(dataRelation); } }
public static void FillDataSet(DataSet dataSet) { Dal.FillDataSet(dataSet, "Table_OrderDetailsRent", "[ID]"); CarExtra_DAL.FillDataSet(dataSet); DataRelation dataRelation = null; dataRelation = new DataRelation("OrderDetailsRentCarExtra", dataSet.Tables["Table_CarExtra"].Columns["Id"], dataSet.Tables["Table_OrderDetailsRent"].Columns["CarExtra"]); dataSet.Relations.Add(dataRelation); OrderRent_DAL.FillDataSet(dataSet); dataRelation = null; dataRelation = new DataRelation("OrderDetailsRentOrder", dataSet.Tables["Table_OrderRent"].Columns["Id"], dataSet.Tables["Table_OrderDetailsRent"].Columns["Order"]); dataSet.Relations.Add(dataRelation); }