* Translated Views
* Added UserName entity, dto and mapping * Changed some Dtos to use BaseClass
This commit is contained in:
@@ -68,35 +68,32 @@
|
||||
AllowFiltering="true"
|
||||
Responsive="true"
|
||||
AllowPaging="true"
|
||||
PageSize="20"
|
||||
PageSize="10"
|
||||
AllowSelection="true"
|
||||
AllowRowClick="true"
|
||||
SelectionMode="GridSelectionMode.Single"
|
||||
SelectedItemsChanged="SelectedEdiCustomerOrderLineChanged">
|
||||
<GridColumns>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="CoLine" PropertyName="CoLine">
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Linia" PropertyName="CustomerOrderLine">
|
||||
@context.CustomerOrderLine
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="SalesChannelProductCode" PropertyName="SalesChannelProductCode">
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Pozycja" PropertyName="Item">
|
||||
@context.Item
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="ShipperProductCode" PropertyName="ShipperProductCode">
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Pozycja Klienta" PropertyName="CustomerItemNumber">
|
||||
@context.CustomerItemNumber
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Qty" TextAlignment="Alignment.End" PropertyName="Qty">
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Ilość" TextAlignment="Alignment.End" PropertyName="BlanketQty">
|
||||
@context.BlanketQty
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Address" PropertyName="Address">
|
||||
@context.Address
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="J/M" PropertyName="Uom">
|
||||
@context.Uom
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="BoxType" PropertyName="BoxType">
|
||||
@context.BoxType
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Cena" PropertyName="ContPrice">
|
||||
@context.ContPrice
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="FinalDestination" PropertyName="FinalDestination">
|
||||
@context.FinalDestination
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="QtyPerBox" PropertyName="QtyPerBox">
|
||||
@context.QtyPerBox
|
||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Status" PropertyName="Status">
|
||||
@context.Status
|
||||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
|
||||
@@ -2,5 +2,16 @@
|
||||
{
|
||||
public class DtoBase
|
||||
{
|
||||
protected static string TranslateStatus(string status)
|
||||
{
|
||||
return status switch
|
||||
{
|
||||
"O" => "Zamówione",
|
||||
"S" => "Zatrzymane",
|
||||
"P" => "Planowane",
|
||||
"C" => "Zakończone",
|
||||
_ => status
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,17 +106,5 @@ namespace SytelineSaAppEfDataModel.Dtos
|
||||
|
||||
public IEnumerable<EdiCustomerOrderLineDto> EdiCustomerOrderLines { get; set; } = new List<EdiCustomerOrderLineDto>();
|
||||
public IEnumerable<EdiCustomerOrderTranslateDto> EdiCustomerOrderTranslates { get; set; } = new List<EdiCustomerOrderTranslateDto>();
|
||||
|
||||
private static string TranslateStatus(string status)
|
||||
{
|
||||
return status switch
|
||||
{
|
||||
"O" => "Zamówione",
|
||||
"S" => "Zatrzymane",
|
||||
"P" => "Planowane",
|
||||
"C" => "Zakończone",
|
||||
_ => status
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SytelineSaAppEfDataModel.Dtos
|
||||
{
|
||||
public class EdiCustomerOrderLineDto
|
||||
public class EdiCustomerOrderLineDto : DtoBase
|
||||
{
|
||||
public string CustomerOrderNumber { get; set; }
|
||||
public int CustomerOrderLine { get; set; }
|
||||
@@ -38,6 +38,8 @@ namespace SytelineSaAppEfDataModel.Dtos
|
||||
public string Address { get; set; }
|
||||
public string FinalDestination { get; set; }
|
||||
public int? QtyPerBox { get; set; }
|
||||
|
||||
public string TranslatedStatus => TranslateStatus(Status);
|
||||
|
||||
public IEnumerable<EdiCustomerOrderLineItemDto> EdiCustomerOrderLineItems { get; set; }
|
||||
}
|
||||
|
||||
42
SytelineSaAppEfDataModel/Dtos/UserNameDto.cs
Normal file
42
SytelineSaAppEfDataModel/Dtos/UserNameDto.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
namespace SytelineSaAppEfDataModel.Dtos;
|
||||
|
||||
public class UserNameDto
|
||||
{
|
||||
public long UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public short EditLevel { get; set; }
|
||||
public bool SuperUserFlag { get; set; }
|
||||
public string UserPassword { get; set; }
|
||||
public string SQLServerLogin { get; set; }
|
||||
public string SQLServerPassword { get; set; }
|
||||
public string UserDesc { get; set; }
|
||||
public string WorkstationLogin { get; set; }
|
||||
public bool NoteExistsFlag { get; set; }
|
||||
public string CreatedBy { get; set; }
|
||||
public string UpdatedBy { get; set; }
|
||||
public DateTime CreateDate { get; set; }
|
||||
public DateTime RecordDate { get; set; }
|
||||
public Guid RowPointer { get; set; }
|
||||
public short ConcurrentSessions { get; set; }
|
||||
public string ConcurrentSessionsSpec { get; set; }
|
||||
public bool InWorkflow { get; set; }
|
||||
public short Status { get; set; }
|
||||
public DateTime? PasswordExpirationDate { get; set; }
|
||||
public short LoginFailures { get; set; }
|
||||
public DateTime? UnlockDate { get; set; }
|
||||
public bool PasswordNeverExpires { get; set; }
|
||||
public DateTime? EventMessagesLastCheckedTime { get; set; }
|
||||
public bool SendEmailPrompts { get; set; }
|
||||
public string LanguageCode { get; set; }
|
||||
public string MobileDefaultForm { get; set; }
|
||||
public bool SendEmailNotifications { get; set; }
|
||||
public string EmailPromptsEmailType { get; set; }
|
||||
public string EmailNotificationsEmailType { get; set; }
|
||||
public string PrimaryEmailType { get; set; }
|
||||
public string SourceControlUsername { get; set; }
|
||||
public string SourceControlPassword { get; set; }
|
||||
public string RfqProfile { get; set; }
|
||||
public string RfqFaxNum { get; set; }
|
||||
public string Uf_ZPL_EmpNum { get; set; }
|
||||
public string Uf_PLT_EmpNum { get; set; }
|
||||
}
|
||||
42
SytelineSaAppEfDataModel/Entities/UserName.cs
Normal file
42
SytelineSaAppEfDataModel/Entities/UserName.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
namespace SytelineSaAppEfDataModel.Entities;
|
||||
|
||||
public class UserName
|
||||
{
|
||||
public long UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public short EditLevel { get; set; }
|
||||
public bool SuperUserFlag { get; set; }
|
||||
public string UserPassword { get; set; }
|
||||
public string SQLServerLogin { get; set; }
|
||||
public string SQLServerPassword { get; set; }
|
||||
public string UserDesc { get; set; }
|
||||
public string WorkstationLogin { get; set; }
|
||||
public bool NoteExistsFlag { get; set; }
|
||||
public string CreatedBy { get; set; }
|
||||
public string UpdatedBy { get; set; }
|
||||
public DateTime CreateDate { get; set; }
|
||||
public DateTime RecordDate { get; set; }
|
||||
public Guid RowPointer { get; set; }
|
||||
public short ConcurrentSessions { get; set; }
|
||||
public string ConcurrentSessionsSpec { get; set; }
|
||||
public bool InWorkflow { get; set; }
|
||||
public short Status { get; set; }
|
||||
public DateTime? PasswordExpirationDate { get; set; }
|
||||
public short LoginFailures { get; set; }
|
||||
public DateTime? UnlockDate { get; set; }
|
||||
public bool PasswordNeverExpires { get; set; }
|
||||
public DateTime? EventMessagesLastCheckedTime { get; set; }
|
||||
public bool SendEmailPrompts { get; set; }
|
||||
public string LanguageCode { get; set; }
|
||||
public string MobileDefaultForm { get; set; }
|
||||
public bool SendEmailNotifications { get; set; }
|
||||
public string EmailPromptsEmailType { get; set; }
|
||||
public string EmailNotificationsEmailType { get; set; }
|
||||
public string PrimaryEmailType { get; set; }
|
||||
public string SourceControlUsername { get; set; }
|
||||
public string SourceControlPassword { get; set; }
|
||||
public string RfqProfile { get; set; }
|
||||
public string RfqFaxNum { get; set; }
|
||||
public string Uf_ZPL_EmpNum { get; set; }
|
||||
public string Uf_PLT_EmpNum { get; set; }
|
||||
}
|
||||
@@ -22,6 +22,7 @@ namespace SytelineSaAppEfDataModel
|
||||
CreateMap<CustomerOrder, CustomerOrderDto>().ReverseMap();
|
||||
CreateMap<CustomerOrderLine, CustomerOrderLineDto>().ReverseMap();
|
||||
CreateMap<CustomerOrderLineItem, CustomerOrderLineItemDto>().ReverseMap();
|
||||
CreateMap<UserName, UserNameDto>().ReverseMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ namespace SytelineSaAppEfDataModel
|
||||
public DbSet<CustomerOrder> CustomerOrders { get; set; }
|
||||
public DbSet<CustomerOrderLine> CustomerOrderLines { get; set; }
|
||||
public DbSet<CustomerOrderLineItem> CustomerOrderLineItems { get; set; }
|
||||
|
||||
public DbSet<UserName> UserNames { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
@@ -621,6 +623,51 @@ namespace SytelineSaAppEfDataModel
|
||||
entity.Property(e => e.Uf_Status).HasColumnName("Uf_Status").HasMaxLength(50).IsRequired(false);
|
||||
entity.Property(e => e.Uf_FKR_EDI_ITEM_PalletCode).HasColumnName("Uf_FKR_EDI_ITEM_PalletCode").HasMaxLength(50).IsRequired(false);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<UserName>(entity =>
|
||||
{
|
||||
entity.ToTable("UserNames");
|
||||
|
||||
entity.HasKey(e => e.UserId);
|
||||
|
||||
entity.Property(e => e.UserId).HasColumnName("UserId").ValueGeneratedOnAdd();
|
||||
entity.Property(e => e.Username).HasColumnName("Username").HasMaxLength(60).IsRequired();
|
||||
entity.Property(e => e.EditLevel).HasColumnName("EditLevel").HasColumnType("smallint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.SuperUserFlag).HasColumnName("SuperUserFlag").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.UserPassword).HasColumnName("UserPassword").HasMaxLength(300).HasDefaultValueSql("'287C0C4DB105827AC41D11555D199265966ECF1FC527B37B6740FF6491427E54EA80'");
|
||||
entity.Property(e => e.SQLServerLogin).HasColumnName("SQLServerLogin").HasMaxLength(60).IsRequired(false);
|
||||
entity.Property(e => e.SQLServerPassword).HasColumnName("SQLServerPassword").HasMaxLength(140).IsRequired(false);
|
||||
entity.Property(e => e.UserDesc).HasColumnName("UserDesc").HasMaxLength(510).IsRequired(false);
|
||||
entity.Property(e => e.WorkstationLogin).HasColumnName("WorkstationLogin").HasMaxLength(144).IsRequired(false);
|
||||
entity.Property(e => e.NoteExistsFlag).HasColumnName("NoteExistsFlag").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.CreatedBy).HasColumnName("CreatedBy").HasMaxLength(60).HasDefaultValueSql("suser_sname()");
|
||||
entity.Property(e => e.UpdatedBy).HasColumnName("UpdatedBy").HasMaxLength(60).HasDefaultValueSql("suser_sname()");
|
||||
entity.Property(e => e.CreateDate).HasColumnName("CreateDate").HasDefaultValueSql("getdate()");
|
||||
entity.Property(e => e.RecordDate).HasColumnName("RecordDate").HasDefaultValueSql("getdate()");
|
||||
entity.Property(e => e.RowPointer).HasColumnName("RowPointer").HasColumnType("uniqueidentifier").HasDefaultValueSql("newid()");
|
||||
entity.Property(e => e.ConcurrentSessions).HasColumnName("ConcurrentSessions").HasColumnType("smallint").HasDefaultValueSql("1");
|
||||
entity.Property(e => e.ConcurrentSessionsSpec).HasColumnName("ConcurrentSessionsSpec").HasMaxLength(2000).IsRequired(false);
|
||||
entity.Property(e => e.InWorkflow).HasColumnName("InWorkflow").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.Status).HasColumnName("Status").HasColumnType("smallint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.PasswordExpirationDate).HasColumnName("PasswordExpirationDate").IsRequired(false);
|
||||
entity.Property(e => e.LoginFailures).HasColumnName("LoginFailures").HasColumnType("smallint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.UnlockDate).HasColumnName("UnlockDate").IsRequired(false);
|
||||
entity.Property(e => e.PasswordNeverExpires).HasColumnName("PasswordNeverExpires").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.EventMessagesLastCheckedTime).HasColumnName("EventMessagesLastCheckedTime").IsRequired(false);
|
||||
entity.Property(e => e.SendEmailPrompts).HasColumnName("SendEmailPrompts").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.LanguageCode).HasColumnName("LanguageCode").HasMaxLength(6).IsRequired(false);
|
||||
entity.Property(e => e.MobileDefaultForm).HasColumnName("MobileDefaultForm").HasMaxLength(100).IsRequired(false);
|
||||
entity.Property(e => e.SendEmailNotifications).HasColumnName("SendEmailNotifications").HasColumnType("tinyint").HasDefaultValueSql("0");
|
||||
entity.Property(e => e.EmailPromptsEmailType).HasColumnName("EmailPromptsEmailType").HasMaxLength(60).IsRequired(false);
|
||||
entity.Property(e => e.EmailNotificationsEmailType).HasColumnName("EmailNotificationsEmailType").HasMaxLength(60).IsRequired(false);
|
||||
entity.Property(e => e.PrimaryEmailType).HasColumnName("PrimaryEmailType").HasMaxLength(60).IsRequired(false);
|
||||
entity.Property(e => e.SourceControlUsername).HasColumnName("SourceControlUsername").HasMaxLength(60).IsRequired(false);
|
||||
entity.Property(e => e.SourceControlPassword).HasColumnName("SourceControlPassword").HasMaxLength(300).IsRequired(false);
|
||||
entity.Property(e => e.RfqProfile).HasColumnName("rfq_profile").HasMaxLength(80).IsRequired(false);
|
||||
entity.Property(e => e.RfqFaxNum).HasColumnName("rfq_fax_num").HasMaxLength(50).IsRequired(false);
|
||||
entity.Property(e => e.Uf_ZPL_EmpNum).HasColumnName("uf_ZPL_emp_num").HasMaxLength(7).IsRequired(false);
|
||||
entity.Property(e => e.Uf_PLT_EmpNum).HasColumnName("uf_PLT_emp_num").HasMaxLength(14).IsRequired(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user