private static void CreateChargeTasks(MachinesDTO communicationMachine, Shuttle shuttle) { var asrs = asrsData.GetAllAsrs().First(x => x.Location == Location.WH_OUT); var taskBatch = machineTasksData.GetNewTaskBatch(); var chrgAddress = addressData.GetAvailableChargeAddress(); MachineTask opt1 = new MachineTask //asrs shuttle taşıma { OrderDetailPalletId = 0, ProductNotificationId = 0, TaskType = (int)TaskType.ShCHRG, TaskBatch = taskBatch, Sequence = 1, MachineCode = asrs.Code, SourceType = AddressType.ADDRESS, SourceAddress = shuttle.LastAddress, LoadInfo = shuttle.Code, TargetType = AddressType.ADDRESS, TargetAddress = chrgAddress, AssignUser = "******", AssignReason = "Charge", AssignTime = DateTime.Now, StartTime = null, EndTime = null, SentFlag = false, IsCompleted = false, ErrorCode = null }; machineTasksData.InsertMachineTaskBatch(new List <MachineTask> { opt1 }); }