public TaskFinishGridViewModel(IEnumerable <CNCItem> CNCItems, IMachinesInfoRepository _machinesinfoRepository)
 {
     foreach (CNCItem _item in CNCItems)
     {
         string machineName          = (_machinesinfoRepository.GetMInfoByCode(_item.CNCMachine) ?? new MachinesInfo()).MachineName;
         TaskFinishGridRowModel _row = new TaskFinishGridRowModel(_item, machineName);
         rows.Add(_row);
     }
 }
 public TaskFinishGridViewModel(IEnumerable <Task> Tasks)
 {
     foreach (Task _task in Tasks)
     {
         //string machineName= _machinesinfoRepository.GetMInfoByCode(_task.)
         TaskFinishGridRowModel _row = new TaskFinishGridRowModel(_task);
         rows.Add(_row);
     }
 }