Exemple #1
0
        public static void FillDataSet(DataSet dataSet)
        {
            if (!dataSet.Tables.Contains("Table_PayBuy"))
            {
                Dal.FillDataSet(dataSet, "Table_PayBuy", "[ID]");

                OrderBuy_DAL.FillDataSet(dataSet);

                DataRelation dataRelation = null;
                dataRelation = new DataRelation("PayBuyOrderBuy", dataSet.Tables["Table_OrderBuy"].Columns["Id"],
                                                dataSet.Tables["Table_PayBuy"].Columns["OrderBuy"]);

                dataSet.Relations.Add(dataRelation);
            }
        }
        public static void FillDataSet(DataSet dataSet)
        {
            Dal.FillDataSet(dataSet, "Table_OrderDetailsBuy", "[ID]");

            CarExtra_DAL.FillDataSet(dataSet);

            DataRelation dataRelation = null;

            dataRelation = new DataRelation("OrderDetailsBuyCarExtra", dataSet.Tables["Table_CarExtra"].Columns["Id"],
                                            dataSet.Tables["Table_OrderDetailsBuy"].Columns["CarExtra"]);

            dataSet.Relations.Add(dataRelation);

            OrderBuy_DAL.FillDataSet(dataSet);

            dataRelation = null;
            dataRelation = new DataRelation("OrderDetailsBuyOrder", dataSet.Tables["Table_OrderBuy"].Columns["Id"],
                                            dataSet.Tables["Table_OrderDetailsBuy"].Columns["Order"]);

            dataSet.Relations.Add(dataRelation);
        }