public ServiceClaimDlg(ServiceClaimType type) { this.Build(); UoWGeneric = UnitOfWorkFactory.CreateWithNewRoot <ServiceClaim>(new ServiceClaim(type)); if (type == ServiceClaimType.RegularService) { EntitySaved += (sender, args) => CreateOrder(); } Entity.ServiceStartDate = DateTime.Today; Entity.ServiceStartDate = DateTime.Now.AddDays(1); ConfigureDlg(); }
public ServiceClaim(ServiceClaimType type) : this() { ServiceClaimType = type; switch (type) { case ServiceClaimType.JustService: Status = ServiceClaimStatus.DeliveredToWarehouse; break; case ServiceClaimType.RegularService: Status = ServiceClaimStatus.PickUp; break; case ServiceClaimType.RepairmanCall: Status = ServiceClaimStatus.Diagnostics; break; } }