Beispiel #1
0
        public static void getShipping()
        {
            projektEntities ctx   = new projektEntities();
            var             query = from ship in ctx.shipping
                                    join car in ctx.cars on ship.CarId equals car.Id
                                    join dri in ctx.drivers on ship.DriverId equals dri.Id
                                    join fr in ctx.freights on ship.FreightId equals fr.Id
                                    join ca in ctx.cargo on fr.CargoId equals ca.Id
                                    join st in ctx.companies on fr.From equals st.Id
                                    join stci in ctx.cities_list on st.CityId equals stci.Id
                                    join stco in ctx.company_name_list on st.CompanyId equals stco.Id
                                    join de in ctx.companies on fr.To equals de.Id
                                    join deci in ctx.cities_list on de.CityId equals deci.Id
                                    join deco in ctx.company_name_list on de.CompanyId equals deco.Id
                                    select new
            {
                Shipping           = ship,
                Car                = car,
                Driver             = dri,
                Freight            = fr,
                Cargo              = ca,
                Start              = st,
                StartCity          = stci,
                StartCompany       = stco,
                Destination        = de,
                DestinationCity    = deci,
                DestinationCompany = deco
            };

            ShippingForm.clearDataGridView();
            foreach (var result in query)
            {
                ShippingForm.fillDataGridView(result.Shipping.Id, result.Driver.Surname + " " + result.Driver.Name, result.Car.Make + " " + result.Car.Model + ", " + result.Car.Number_plate,
                                              result.Cargo.Name + ": " + result.StartCompany.Company + ", " + result.StartCity.City + '\u279C' + result.DestinationCompany.Company + ", " + result.DestinationCity.City,
                                              result.Shipping.DepartTime, result.Shipping.ArriveTime, result.Shipping.Delivered, result.Shipping.Comment);
            }
        }
Beispiel #2
0
        private void button6_Click(object sender, EventArgs e)
        {
            ShippingForm SF = new ShippingForm();

            SF.Show();
        }
Beispiel #3
0
 private void button6_Click(object sender, EventArgs e)
 {
     ShippingForm SF = new ShippingForm();
     SF.Show();
 }