private TicketVo toTicketVo(Ticket t) { var tv = new TicketVo { AssetNo = t.AssetNo, Attach = t.Attach, Category = t.Category, Company = t.Company, CompanyCode = t.CompanyCode, CompanyWBS = t.CompanyWBS, Counter = t.Counter, CreatedBy = t.CreatedBy, CreatedDate = t.CreatedDate, DeptCodeEscalate = t.DeptCodeEscalate, DeptEscalate = t.DeptEscalate, DescStatus = t.DescStatus, DetailCategory = t.DetailCategory, DetailCategoryId = t.DetailCategoryId, DeviceType = t.DeviceType, DeviceTypeId = t.DeviceTypeId, Email = t.Email, EndDate = t.EndDate, EndDateAct = t.EndDateAct, EndTime = t.EndTime, EndTimeAct = t.EndTimeAct, Escalate = t.Escalate, EscalateSn = t.EscalateSn, ExistingDevice = t.ExistingDevice, Ext = t.Ext, FromDeptCodeEscalate = t.FromDeptCodeEscalate, FromDeptEscalate = t.FromDeptEscalate, FromEscalate = t.FromEscalate, FromEscalateSn = t.FromEscalateSn, IdNumber = t.IdNumber, Idx = t.Idx, IdxReqProblem = t.IdxReqProblem, Impact = t.Impact, IsSmup = t.IsSmup, LastIp = t.LastIp, LastUpdate = t.LastUpdate, LastUser = t.LastUser, Location = t.Location, LocationId = t.LocationId, MTicketId = t.MTicketId, Phone = t.Phone, Priority = t.Priority, PrjId = t.PrjId, PrjName = t.PrjName, Problem = t.Problem, ProblemHeader = t.ProblemHeader, Product = t.Product, Reason = t.Reason, ReferenceNo = t.ReferenceNo, ReopenLevel = t.ReopenLevel, ReportBy = t.ReportBy, ReportDate = t.ReportDate, ReportedTime = t.ReportedTime, ReportHelpdeskBy = t.ReportHelpdeskBy, ReportTime = t.ReportTime, ReportVia = t.ReportVia, Resolution = t.Resolution, RevenueType = t.RevenueType, Sla = t.Sla, StartDate = t.StartDate, StartTime = t.StartTime, StatusTicket = t.StatusTicket, SubRevenueType = t.SubRevenueType, TicketId = t.TicketId, TimeDetail = t.TimeDetail, Urgency = t.Urgency, UserAccess = t.UserAccess, Warranty = t.Warranty, WBSNo = t.WBSNo, WorkingTime = t.WorkingTime, YearPurchase = t.YearPurchase }; return(tv); }
public TransferAssetRequestDTO GetDummyData(TicketVo t) { var workflow = new List <RoutingItemDTO> { new RoutingItemDTO { ActualDate = DateTime.Now, BaseDate = DateTime.Now, Division = "Warehouse", DivisionStatus = false, Instruction = "Fixed the information please!", PlanDate = DateTime.Now, Response = "Muke gile...", RoutingStatus = ERoutingStatus.IN_PROGRESS, SaStatus = false, Step = 1 }, new RoutingItemDTO { ActualDate = DateTime.Now, BaseDate = DateTime.Now, Division = "Sales Admin", DivisionStatus = false, Instruction = "Fixed the information please!", PlanDate = DateTime.Now, Response = "Muke gile juga!", RoutingStatus = ERoutingStatus.IN_PROGRESS, SaStatus = false, Step = 2 } }; var routings = new List <TransferAssetRoutingInfoDTO>(); var rbh = new TransferAssetByHolderRoutingInfoDTO { CreateDate = DateTime.Now, CurrentStep = 1, IdrWebNumber = "123456", NewContract = new TransferAssetNewContractDTO { DeliveryOrderToUser = "******", Device = "Laptop", DeviceSn = "343234", EquipDesc = "Laptop Lenovo i3", Equipment = "234324", NewHolderName = "Bromo Kunto Adji", NewLineNumber = "32", NewLocation = "Jakarta", NewNumber = "NEW-54534534", NewSalaryNumber = "SAL-2234324", ReturnDeliveryNumber = "RET-2343224", SoDeliveryNumber = "SOD-2342344" }, OldContract = new TransferAssetOldContractDTO { Device = "Laptop", DeviceSn = "343234", EquipDesc = "Laptop Lenovo i3", Equipment = "234324", OldHolderName = "Indra Birowo", OldLineNumber = "32", OldLocation = "Jakarta", OldNumber = "OLD-54534534", OldSalaryNumber = "SAL-4323423", }, RoutingMemo = "Please dikerjakan semua ya!", Routings = workflow, SubScenario = ESubScenario.BY_HOLDER_NAME }; routings.Add(rbh); var rbl = new TransferAssetByLocationRoutingInfoDTO { CreateDate = DateTime.Now, CurrentStep = 1, IdrWebNumber = "123456", UpdContract = new TransferAssetUpdatedContractDTO { Device = "Laptop", DeviceSn = "343234", EquipDesc = "Laptop Lenovo i3", Equipment = "234324", OldHolderName = "Indra Birowo", OldLineNumber = "32", OldLocation = "Jakarta", OldNumber = "OLD-54534534", OldSalaryNumber = "SAL-4323423", UpdLocation = "Bangka Belitung" }, OldContract = new TransferAssetOldContractDTO { Device = "Laptop", DeviceSn = "343234", EquipDesc = "Laptop Lenovo i3", Equipment = "234324", OldHolderName = "Indra Birowo", OldLineNumber = "32", OldLocation = "Jakarta", OldNumber = "OLD-54534534", OldSalaryNumber = "SAL-4323423", }, RoutingMemo = "Please dikerjakan semua ya!", Routings = workflow, SubScenario = ESubScenario.BY_HOLDER_NAME }; routings.Add(rbl); var req = new TransferAssetRequestDTO { Id = _indexDao.NewServiceRequestId(), RequestInfo = new TransferAssetRequestInfoDTO { Company = t.Company, DetailCategory = t.DetailCategory, Email = t.Email, Id = t.IdNumber, Location = t.Location, RequestMemo = t.Problem, RequestedBy = t.ReportBy, RequestedDate = DateTime.ParseExact(t.ReportDate, Properties.Settings.Default.HelpdeskDateFormat, System.Globalization.CultureInfo.InvariantCulture), RequestedVia = t.ReportVia, SnOrIdNumber = t.IdNumber, TicketCategory = t.Category }, IssuedBy = "Helpdesk", IssuedDate = DateTime.Now, Scenario = EScenario.TRANSFER_ASSET, State = EServiceRequestState.DRAFT, Routings = routings }; return(req); }