Base solution for your next web application

Activities of "paul lee"

Hi All,

I am new to ASP.NET MVC and Single Page Application, I am trying to develop a SPA for managing member's information.

At the moment I am trying to add a new View for typing in the Member's Personal Info and needed a field for Date Of Birth, the field can either be a formatted TextBox or a DatePicker.

Here is what I have got so far in the cshtml:

<div ng-controller="coa.views.people.new as vm">
  <form id="NewPersonForm" role="form" name="newPersonForm" novalidate>
    <div class="form-group">
      <label for="MemberId">@L("MemberIdDescription")</label>
      <text id="MemberId" ng-model="vm.person.memberId" class="form-control"></text>
    </div>
    <div class="form-group">
      <label for="ChiSurname">@L("ChineseSurnameDescription")</label>
      <text id="ChiSurname" ng-model="vm.person.chiSurname" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="ChiOtherNames">@L("ChineseOtherNamesDescription")</label>
      <text id="ChiOtherNames" ng-model="vm.person.chiOtherNames" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="EngSurname">@L("EnglishSurnameDescription")</label>
      <text id="EngSurname" ng-model="vm.person.engSurname" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="EngOtherNames">@L("EnglishOtherNamesDescription")</label>
      <text id="EngOtherNames" ng-model="vm.person.engOtherNames" class="form-control" required></text>
    </div>
    <div class="form-group">
      <label for="Alias">@L("AliasDescription")</label>
      <text id="Alias" ng-model="vm.person.alias" class="form-control"></text>
    </div>
    <div class="form-group">
      <label for="DateOfBirth">@L("DateOfBirthDescription")</label>
      <text id="DateOfBirth" ng-model="vm.person.dob" class="form-control" required></text>
    </div>
  </form> 
</div>

I am not sure what tag to use for Formatted TextBox or DatePicker, most of the examples from Google searches on Razor / cshtml seems to use the native Razor markups so I am not sure what to use here.

Please Help!

Thank you very much.

Paul

Hi all,

I am in a similar situation, but my problem comes from DTO Data Validation failed on the server side, however, all I have got from the pop-up windows is "Your request is not valid."

I have added all the DataAnnotations to the Input DTO with ErrorMessage set, but I can't get them to be displayed in that big pop-up.

The following is a sample of one Property from the AddressInput (DTO):

[Required(ErrorMessage = "Unit in Address is required")]
    [StringLength(5
                                , ErrorMessage = "Unit in Address can not be longer then 5 characters")]
    public string Unit { get; set; }

So what do we need to do to get these messages displayed in that pop-up?

I have successfully added a custom WebApi controller in the WebApiModule, but how can I get ABP to generate the Dynamic JavaScript Proxy for these custom WebApi controllers?

If I can not, does that means I will have to hardcode the URL in the AngularJs side to consume these controllers?

Hi Halil,

I would like to take a stab at the problem but I need some information on how the JavaScript proxies are being generated by the framework at the moment. However, I could not find the info from ABP documentations. Will you be kind enough to explain briefly about this process?

Thank you!

Hi,

I am working on a project which would benefit from using Abp, however, the management doesn't allow me to use the framework per see. So I am trying to grab stuff from Abp where-ever I need them (hope the author of Abp don't mind), hope that one day I can be allowed to transfer this app to use Abp.

At the moment I am trying to get the ng-include to successfully include the header.cshtml. When I ran the webapp, I am getting 403-Forbidden back from ASP.Net for those ng-include(s).

So, please can you explain how can I get cshtml successfully being included?

Thank you very much for your help.

Hi there,

I have the following model:

public class User : AbpUser<Tenant, User>
  {
    // code omitted for brevity
    [ForeignKey("Employeer")]
    public virtual long? EmployeerId { get; set; }
    public virtual Company Employeer { get; set; }
  }

  public class Company : FullAuditedEntity<long>, IMustHaveTenant
  {
    // code omitted for brevity
    [Required]
    [StringLength(MaxCodeLength)]
    public virtual string Code { get; private set; }  
    [Required]
    [StringLength(MaxNameLength)]
    public virtual string Name { get; private set; }
    public virtual int TenantId { get; set; }

    public virtual ICollection<User> Employees { get; private set; }
  }

And I want to map this into the following DTO:

[AutoMapFrom(typeof(User))]
  public class UserLoginInfoDto : EntityDto<long>
  {
    public string Name { get; set; }
    public string Surname { get; set; }
    public string UserName { get; set; }
    public string EmailAddress { get; set; }
    public string EmployeerName { get; set; }
  }

But AutoMapper is not mapping the Company.Name into EmployeerName in the DTO. How can I make this happen?

Thanks

It turns out to be a data problem, forgot to link the AbpUser with the default Company row, therefore, no Company name to be displayed.

I haven't changed the private Set's on the Entity and it seems to be working just fine.

Thank you very much!

Hi,

I am on the same boat as the OP and due to the limitations in my organisation, it is not possible for me to update the .NET framework version to v4.6.1 as required by Abp v0.8.0.1.

In the mean-time I tried to download the source of Abp-master and recompile to target 4.5.2, however, I am getting a lot of errors and not sure how to proceed further.

So how can anyone that are stuck with .NET framework v4.5.2, still be able to deploy Abp successfully?

  1. Are there any back version which are not too different in feature that supports v4.5.2?
  2. Are there specific instructions to recompile Abp to target v4.5.2?
  3. How long or how much effort will be involved to add support for targeting at lease the 4.5 and 4.6 series of .NET?

-- Edit to add one more idea 4. Is it possible to make available a feature on the website that can generate templates that are based on Abp v0.7.8.0? -- End Edit

I have opened an issue as suggested by hikalkan on GitHub.

Thank you

Hi all,

I am very very new to Hangfire (I just know it is used to run jobs in the background) and this will be my first contact with it so please bear with me.

I am in the middle of a project where I need to generate some report and data export files in Excel and PDF. But our web server is quite busy so I need to off-load this document generation process to some other servers. I have read up on Hangfire's overview page that this can be configured as "Separate Server".

I can not vision how this is possible with Abp + Hangfire, can someone kindly explain generally how this can be done?

Thank you very much. Paul

Hi All,

I am following BackgroundJobAndNotificationDemo from Abp.Samples to try to get this document generation background job working.

I have a BackgroundJob defined as follows and following the sample project, this class lives in the Core module:

public class ExcelGenerationJob : BackgroundJob<ExcelGenerationJobArgs>, ITransientDependency
{
  // Some other code....

  public ExcelGenerationJob()
  {
    LocalizationSourceName = ProjectConsts.LocalizationSourceName;
  }

  // However, I get whatever string I passed to L() back here 
  public void ComposeAdText()
  {
    var stringBuilder = new StringBuilder();
    stringBuilder.AppendLine(L("AdTextLine1"));
    
    // Here in the Log I always see AdTextLine1 being attached to the log line...
    Logger.Debug("Localizing AdTextLine1 - " + stringBuilder.ToString()); 
  }
}

I tried to debug a bit and see that base.LocalizationManager.GetAllSources().Count is always 0. So what's the proper way to initialize Localization to get this working?

Thanks.

Showing 1 to 10 of 17 entries