Exemplo n.º 1
0
        public bool WorkOrderUpdate(WorkOrder workorder)
        {
            return Execute<bool>(dal =>
            {
                WorkOrder workorderUpdate = dal.WorkOrder.Where(x => x.WorkOrderID == workorder.WorkOrderID).FirstOrDefault();
                if (workorderUpdate != null)
                {
                    workorderUpdate.WorkOrderID = workorder.WorkOrderID;
                    workorderUpdate.ProductID = workorder.ProductID;
                    workorderUpdate.OrderQty = workorder.OrderQty;
                    workorderUpdate.StockedQty = workorder.StockedQty;
                    workorderUpdate.ScrappedQty = workorder.ScrappedQty;
                    workorderUpdate.StartDate = workorder.StartDate;
                    workorderUpdate.EndDate = workorder.EndDate;
                    workorderUpdate.DueDate = workorder.DueDate;
                    workorderUpdate.ScrapReasonID = workorder.ScrapReasonID;
                    workorderUpdate.ModifiedDate = workorder.ModifiedDate;

                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
Exemplo n.º 2
0
        public bool WorkOrderDelete(WorkOrder workorder)
        {
            return Execute<bool>(dal =>
            {
                WorkOrder workorderDelete = dal.WorkOrder.Where(x => x.WorkOrderID == workorder.WorkOrderID).FirstOrDefault();
                if (workorderDelete != null)
                {
                    dal.WorkOrder.DeleteOnSubmit(workorderDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
		private void detach_WorkOrders(WorkOrder entity)
		{
			this.SendPropertyChanging();
			entity.Product = null;
		}
		private void attach_WorkOrders(WorkOrder entity)
		{
			this.SendPropertyChanging();
			entity.Product = this;
		}
 partial void DeleteWorkOrder(WorkOrder instance);
 partial void UpdateWorkOrder(WorkOrder instance);
 partial void InsertWorkOrder(WorkOrder instance);
		private void detach_WorkOrders(WorkOrder entity)
		{
			this.SendPropertyChanging();
			entity.ScrapReason = null;
		}
Exemplo n.º 9
0
 public void WorkOrderUpdate(WorkOrder workorder)
 {
     adventureWorks_BC.WorkOrderUpdate(workorder);
 }
Exemplo n.º 10
0
 public void WorkOrderAdd(WorkOrder workorder)
 {
     adventureWorks_BC.WorkOrderAdd(workorder);
 }