public ActionResult ZipOrder(Claim model) { try { ResponseMessage responseMessage; bool complete = model.Go(out responseMessage); if (!complete) { throw new Exception(responseMessage.ErrorMessage); } var claim = new Claim(model.Id); ServiceSheet lastServSheet = claim.GetLastServiceSheet(); string zipOrderUrl = $"{ConfigurationManager.AppSettings["zipClaimHost"]}/Claims/Editor?snum={claim.Device.SerialNum}&ssid={lastServSheet.Id}&servid={claim.Id}&esid={(String.IsNullOrEmpty(claim.CurEngeneerSid) ? claim.CurTechSid : claim.CurEngeneerSid)}&asid={(String.IsNullOrEmpty(claim.CurAdminSid) ? claim.CurTechSid : claim.CurAdminSid)}&csdnum={claim.ClientSdNum}&cmnt={Url.Encode(lastServSheet.Descr)}&cntr={lastServSheet.CounterMono}&cntrc={lastServSheet.CounterColor}&dvst={lastServSheet.DeviceEnabled}"; return(Redirect(zipOrderUrl)); } catch (Exception ex) { TempData["error"] = ex.Message; return(RedirectToAction("Index", new { id = model.Id })); } return(View("WindowClose")); //return RedirectToAction("List"); }
public ActionResult ServiceSheet(int?id) { if (!id.HasValue) { return(HttpNotFound()); } var model = new ServiceSheet(id.Value); return(View(model)); }
public void AddServiceSheet(ServSheetBaseDTO dto) { ServiceSheet serviceSheet = new ServiceSheet() { ID_Service = dto.ID_Service, phoneID = dto.phoneID, claimed_defect = dto.claimed_defect, phone_description_on_reception = dto.phone_description_on_reception, accesories = dto.accesories, date = dto.date }; DbContext.ServiceSheets.Add(serviceSheet); DbContext.SaveChanges(); }