Exemplo n.º 1
0
        private List <PredefinedTaskIndexVM> SetAttributesToPredefinedTask(string serviceId)
        {
            var predefinedTaskVMLst = new List <PredefinedTaskIndexVM>();
            List <PredefinedTask> predefinedTask = _queries.GetAllPredefinedTaskWhereServiceIdEquals(serviceId);

            for (int i = 0; i < predefinedTask.Count; i++)
            {
                var predefinedTaskLocal = new PredefinedTaskIndexVM();
                predefinedTaskLocal.predefinedTaskId            = predefinedTask[i].PredefinedTaskId.ToString();
                predefinedTaskLocal.predefinedTaskName          = predefinedTask[i].Name;
                predefinedTaskLocal.serviceId                   = predefinedTask[i].ServiceId.ToString();
                predefinedTaskLocal.predefinedTaskCost          = predefinedTask[i].Cost.ToString();
                predefinedTaskLocal.predefinedTaskCostHandLabor = predefinedTask[i].CostHandLabor.ToString();
                predefinedTaskLocal.predefinedTaskDescription   = predefinedTask[i].Description;
                predefinedTaskLocal.predefinedTaskDuration      = predefinedTask[i].Duration.ToString();
                predefinedTaskVMLst.Add(predefinedTaskLocal);
            }

            return(predefinedTaskVMLst);
        }