private void Init()
        {
            switch (objectEnum)
            {
            case ModelObjects.ObjectEnum.Marka:
                _setupBllBrands         = new SetupBll <PRODUCT_BRANDS>();
                gridControl1.DataSource = _setupBllBrands.GetAllToBindingList();

                break;

            case ModelObjects.ObjectEnum.Model:
                _setupBllProductModels  = new SetupBll <PRODUCT_BRANDS_MODEL>();
                gridControl1.DataSource = _setupBllProductModels.GetAllToBindingList();
                break;

            case ModelObjects.ObjectEnum.Birim:
                _setupBllUnits          = new SetupBll <SETUP_UNIT>();
                gridControl1.DataSource = _setupBllUnits.GetAllToBindingList();
                break;

            case ModelObjects.ObjectEnum.UrunKategori:
                _setupBllProductCats    = new SetupBll <PRODUCT_CAT>();
                gridControl1.DataSource = _setupBllProductCats.GetAllToBindingList();
                break;
            }
            this.Text          = objectEnum.ToString();
            labelControl1.Text = string.Format("Yeni {0} ekleyebilir ve {0} seçimi yapabilirsiniz.", objectEnum.ToString());
        }
示例#2
0
        private void Init()
        {
            var setupBll = new SetupBll <PRODUCT_CAT>();

            treeListLookUpEdit1.Properties.DataSource    = setupBll.GetAllList();
            treeListLookUpEdit1.Properties.DisplayMember = "PRODUCT_CAT1";
            treeListLookUpEdit1.Properties.ValueMember   = "PRODUCT_CAT1";
            treeListLookUpEdit1.Properties.TreeList      = treeListLookUpEdit1TreeList;
            treeListLookUpEdit1TreeList.KeyFieldName     = "PRODUCT_CATID";
            treeListLookUpEdit1TreeList.ParentFieldName  = "HIERARCHY";
            treeListLookUpEdit1TreeList.DataSource       = setupBll.GetAllList();
        }
示例#3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var setup = new SetupBll(services, Configuration);

            setup.DependencyInjection();

            services.AddTransient <IEventAccess, EventAccess>();
            services.AddTransient <IInvoiceAccess, InvoiceAccess>();
            services.AddTransient <IOrderAccess, OrderAccess>();
            services.AddTransient <IReservationAccess, ReservationAccess>();
            services.AddTransient <ISportAccess, SportAccess>();
            services.AddTransient <ISportComplexAccess, SportComplexAccess>();

            services.AddMvc();
        }
示例#4
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var setup = new SetupBll(services, Configuration);

            setup.DependencyInjection();

            services.AddTransient <ISportComplexAccess, SportComplexAccess>();
            services.AddTransient <IInvoiceAccess, InvoiceAccess>();
            services.AddTransient <IOrderAccess, OrderAccess>();
            services.AddTransient <IReservationAccess, ReservationAccess>();
            services.AddTransient <ISportAccess, SportAccess>();
            services.AddTransient <ISportComplexAccess, SportComplexAccess>();
            services.AddTransient <IBankAccountAccess, BankAccountAccess>();
            services.AddTransient <IEventAccess, EventAccess>();

            services.AddCors();

            // Add framework services.
            services.AddMvc().AddJsonOptions(options =>
            {
                options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
            });

            // Register the Swagger generator
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new Info
                {
                    Title       = "SportUnite API",
                    Version     = "v1",
                    Description = "SportUnite ASP.NET Core 1.1 RESTful Web API"
                });

                //Enable filters provided by Swashbuckle.AspNetCore.Examples
                c.OperationFilter <DescriptionOperationFilter>();
                c.OperationFilter <ExamplesOperationFilter>();
                c.OperationFilter <AuthorizationInputOperationFilter>();

                // Set the comments path for the Swagger JSON and UI.
                var basePath = PlatformServices.Default.Application.ApplicationBasePath;
                var xmlPath  = Path.Combine(basePath, "API.xml");
                c.IncludeXmlComments(xmlPath);
            });
        }