public bool WorkOrderRoutingUpdate(WorkOrderRouting workorderrouting)
        {
            return Execute<bool>(dal =>
               {
               WorkOrderRouting workorderroutingUpdate = dal.WorkOrderRouting.Where(x => x.WorkOrderID == workorderrouting.WorkOrderID).FirstOrDefault();
               if (workorderroutingUpdate != null)
               {
                   workorderroutingUpdate.WorkOrderID = workorderrouting.WorkOrderID;
                   workorderroutingUpdate.ProductID = workorderrouting.ProductID;
                   workorderroutingUpdate.OperationSequence = workorderrouting.OperationSequence;
                   workorderroutingUpdate.LocationID = workorderrouting.LocationID;
                   workorderroutingUpdate.ScheduledStartDate = workorderrouting.ScheduledStartDate;
                   workorderroutingUpdate.ScheduledEndDate = workorderrouting.ScheduledEndDate;
                   workorderroutingUpdate.ActualStartDate = workorderrouting.ActualStartDate;
                   workorderroutingUpdate.ActualEndDate = workorderrouting.ActualEndDate;
                   workorderroutingUpdate.ActualResourceHrs = workorderrouting.ActualResourceHrs;
                   workorderroutingUpdate.PlannedCost = workorderrouting.PlannedCost;
                   workorderroutingUpdate.ActualCost = workorderrouting.ActualCost;
                   workorderroutingUpdate.ModifiedDate = workorderrouting.ModifiedDate;
                   dal.SubmitChanges();
                   return true;
               }
               return false;

               });
        }
        public bool WorkOrderRoutingDelete(WorkOrderRouting workorderrouting)
        {
            return Execute<bool>(dal =>
            {
                WorkOrderRouting workorderroutingDelete = dal.WorkOrderRouting.Where(x => x.WorkOrderID == workorderrouting.WorkOrderID).FirstOrDefault();
                if (workorderroutingDelete != null)
                {
                    dal.WorkOrderRouting.DeleteOnSubmit(workorderroutingDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
		private void detach_WorkOrderRoutings(WorkOrderRouting entity)
		{
			this.SendPropertyChanging();
			entity.Location = null;
		}
 partial void DeleteWorkOrderRouting(WorkOrderRouting instance);
 partial void UpdateWorkOrderRouting(WorkOrderRouting instance);
 partial void InsertWorkOrderRouting(WorkOrderRouting instance);
		private void attach_WorkOrderRoutings(WorkOrderRouting entity)
		{
			this.SendPropertyChanging();
			entity.WorkOrder = this;
		}
Exemplo n.º 8
0
 public void WorkOrderRoutingUpdate(WorkOrderRouting workorderrouting)
 {
     adventureWorks_BC.WorkOrderRoutingUpdate(workorderrouting);
 }
Exemplo n.º 9
0
 public void WorkOrderRoutingAdd(WorkOrderRouting workorderrouting)
 {
     adventureWorks_BC.WorkOrderRoutingAdd(workorderrouting);
 }