public IActionResult Create() { DeviceWorkRecordViewModel model = new DeviceWorkRecordViewModel { DeviceName = DeviceEnum.Default, ProductionLine = "", StationName = OBTStationNameEnum.Default, Description = "", CreateDate = "", SubmitPerson = "" }; return(View(model)); }
public IActionResult Edit(int id) { var record = _repository.GetDeviceWorkRecords() .Where(item => item.Id == id).First(); DeviceWorkRecordViewModel model = new DeviceWorkRecordViewModel { ID = record.Id, DeviceName = DataProcess.GetDviceEnum(record.DeviceName), ProductionLine = record.CraftName, StationName = DataProcess.GetStationEmun(record.StationName), Description = record.Description, CreateDate = record.CreateDate, SubmitPerson = record.SubmitPerson }; return(View(model)); }