示例#1
0
        private void QueryZapr2()
        {
            hWDataSet.Task1.Clear();
            foreach (HWDataSet.ShippingRow rRow in hWDataSet.Shipping.Rows)
            {
                if ((rRow.date_shipping >= Convert.ToDateTime(txtDate1.Text)) &&
                    (rRow.date_shipping <= Convert.ToDateTime(txtDate2.Text)))
                {
                    HWDataSet.StocksRow sRow = hWDataSet.Stocks.Rows.Find(rRow.StockId) as HWDataSet.StocksRow;

                    HWDataSet.Task1Row zRow = hWDataSet.Task1.NewTask1Row();
                    zRow.Id_stock      = sRow.Id_stock;
                    zRow.LastName      = sRow.LastName;
                    zRow.ID            = rRow.DetailId;
                    zRow.kol_vo        = rRow.Kol_vo;
                    zRow.date_shipping = rRow.date_shipping;
                    hWDataSet.Task1.AddTask1Row(zRow);
                }
            }
            dataGridView1.Refresh();
            this.Text = "Запрос через поиск по ключу";
        }
示例#2
0
 private void QueryZapr3()
 {
     hWDataSet.Task1.Clear();
     foreach (HWDataSet.ShippingRow rRow in hWDataSet.Shipping.Rows)
     {
         if ((rRow.date_shipping >= Convert.ToDateTime(txtDate1.Text)) &&
             (rRow.date_shipping <= Convert.ToDateTime(txtDate2.Text)))
         {
             HWDataSet.StocksRow sRow = rRow.GetParentRow("fk_shipping_to_Stocks")
                                        as HWDataSet.StocksRow;
             HWDataSet.Directory_detailsRow dRow = rRow.GetParentRow("fk_shipping_to_Directory_details")
                                                   as HWDataSet.Directory_detailsRow;
             HWDataSet.Task1Row zRow = hWDataSet.Task1.NewTask1Row();
             zRow.Id_stock      = sRow.Id_stock;
             zRow.LastName      = sRow.LastName;
             zRow.ID            = dRow.ID;
             zRow.kol_vo        = rRow.Kol_vo;
             zRow.date_shipping = rRow.date_shipping;
             hWDataSet.Task1.AddTask1Row(zRow);
         }
     }
     dataGridView1.Refresh();
     this.Text = "Запрос через DataRelation";
 }