Exemplo n.º 1
0
 /// <summary>
 /// 新增初始資料
 /// </summary>
 /// <param name="DataAccess"></param>
 private static void CreateSeedData_MasterData()
 {
     try
     {
         if (DataAccess.Set <BackendUserModel>().Find(SystemCP.SysOperator) == null)
         {
             DataAccess.Add(SystemOperator.SysOperator);
         }
         WorkDatesSeedData.CreateWorkDates(DataAccess);                    //OK
         DeptSeed.CreateDept(Message, DataAccess);                         //OK
         RoleSeeddData.CreateRole(Message, DataAccess);                    //OK
         ChannelSeedData.CreateChannel(Message, DataAccess);               //OK
         CollectionTypeSeedData.CreateCollectionType(Message, DataAccess); //OK
         CustomerSeedData.CreateCustomer(Message, DataAccess);             //OK
         PayerSeedData.CreatePayer(Message, DataAccess);                   //OK
         BillTermSeedData.CreateBillTerm(Message, DataAccess);             //OK
     }
     catch (Exception e)
     {
         Message.AddExceptionError(e);
         throw;
     }
     finally
     {
         Message.WriteLogTxt();
     }
 }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseDeveloperExceptionPage();

            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseCookiePolicy();
            app.UseAuthentication();
            app.UseSession();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Orders}/{action=Index}/{id?}");
            });

            CustomerSeedData.EnsurePopulated(app);
            IdentitySeedData.EnsurePopulated(app);
        }