Ejemplo n.º 1
0
        static void Start()
        {
            try
            {
                MyClass mc = new MyClass();

                string connStr = ConfigurationManager.ConnectionStrings["FuelEntities"].ConnectionString;
                _regionManager = new RegionManager(connStr);
                _azsManager = new AZSManager(connStr);
                _fuelManager = new FuelManager(connStr);

                string fn = "1";
                string an = "1";
                string rn = "1";
                decimal pr = 1;

                var regions = _regionManager.GetAll();
                var azs = _azsManager.GetAll();
                var fuel = _fuelManager.GetAll();

                var res =
                    from f in fuel
                    join a in azs
                    on f.AZSid equals a.id
                    join r in regions
                    on a.RegionId equals r.id
                    select new
                    {
                        Name = f.F_Name,

                        AName = a.AZS_Name,
                        Region = r.RegionName,
                        Price = f.F_Price
                    };

                foreach (var r in res)
                {
                    Console.WriteLine(r.Name + "->" + r.AName + "->" + r.Region + "->" + r.Price);
                   fn = r.Name;
                   an = r.AName;
                   rn = r.Region;
                   pr = Convert.ToDecimal(r.Price);

                }
                Console.WriteLine(fn + " " + an + " " + rn + " " + pr);
                mc.fuel_N = fn;
                mc.azs_N = an;
                mc.region_N = rn;
                mc.PRICE = pr;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string connStr = ConfigurationManager.ConnectionStrings["FuelEntities"].ConnectionString;
            _regionManager = new RegionManager(connStr);
            _AZSManager = new AZSManager(connStr);
            _FuelManager = new FuelinAZSManager(connStr);

            var regions = _regionManager.GetAll();
            var AZSes = _AZSManager.GetAll();
            var fuel = _FuelManager.GetAll();
        }
Ejemplo n.º 3
0
 public MainForm(IAddressManager addressManager, IClientManager clientManager, IDriverLicenseManager driverLicenseManager, IFuelManager fuelManager,
                 IInspectionManager inspectionManager, ITransportCategoryManager transportCategoryManager, ITransportMakeManager transportMakeManager,
                 ITransportManager transportManager, ITransportModelManager transportModelManager, AboutForm aboutForm)
 {
     InitializeComponent();
     this.addressManager           = addressManager;
     this.clientManager            = clientManager;
     this.driverLicenseManager     = driverLicenseManager;
     this.fuelManager              = fuelManager;
     this.inspectionManager        = inspectionManager;
     this.transportCategoryManager = transportCategoryManager;
     this.transportMakeManager     = transportMakeManager;
     this.transportManager         = transportManager;
     this.transportModelManager    = transportModelManager;
     this.aboutForm  = aboutForm;
     dataGridManager = new DataGridManager(dataGrid);
 }