Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "bilalhaidar"

Thanks!

Look at the layout.cshtml under App\common\views\layout folder.

Inside the layout.cshtml you have the following calls:


    <script src="~/api/AbpServiceProxies/GetAll?type=angular&v=@(Clock.Now.Ticks)"></script>
    <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>

Whenever you change language, a new request is set to sever and hence Application_BeginRequest runs to set the Thread culture.

Hope this helps, Bilal

I got the idea thanks a lot :D

Hi Tommy,

Have a look at the following class, it is where the Current Language is being sent to client-side.

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Common/Web/Localization/LocalizationScriptManager.cs">https://github.com/aspnetboilerplate/as ... Manager.cs</a>

Then, Abp Framework, on each new Http Request it runs this code:

/// <summary>
        /// This method is called by ASP.NET system when a request starts.
        /// </summary>
        protected virtual void Application_BeginRequest(object sender, EventArgs e)
        {
            SetCurrentCulture();
        }

        protected virtual void SetCurrentCulture()
        {
            AbpBootstrapper.IocManager.Using<ICurrentCultureSetter>(cultureSetter => cultureSetter.SetCurrentCulture(Context));
        }

Hence, once the user changes culture/language, the Cookie is changed on the client side + on every new request, that cookie is read and stored inside the :

Thread.CurrentThread.CurrentCulture = new CultureInfo(language);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);

That's how I understand it.

Hopefully, Ismail would comment more given his knowledge and experience in this framework.

Regards

Well, in my case, I am building a Survey system. For each new Survey designed and saved in the DB, some users need to be assigned to run this Survey. So I will make sure that for each Survey created, a new Role is created. Also, I will ask the Survey Designer to select which users can run this Survey and fill it. After that, I will programmatically create the Role and add all users in one shot.

I might have many roles, but it will be much easier for the Admin of the app to add/remove users from Roles.

I always thought your name is Hilal :)

So Halil, in other words, for each DbContext, you would get the DbSet and register something like: IRepository<Person> to map to EfRepositoryBase<Person>, something like that?

Thanks

Thanks Tommy. What do you mean by the theme is referenced in the MVC Views?

Thanks Ismail. So what's the process now if you can guide me? Where to start and be able to debug the source code?

Thanks!

What does it mean for a Provider to support multiple timezones? An example maybe?

Thanks :)

Showing 151 to 160 of 461 entries