コード例 #1
0
 public bool CanDeleteSoft()
 {
     if (WorkOrderRouting.Count() != 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
 partial void DeleteWorkOrderRouting(WorkOrderRouting instance);
コード例 #3
0
 partial void UpdateWorkOrderRouting(WorkOrderRouting instance);
コード例 #4
0
 partial void InsertWorkOrderRouting(WorkOrderRouting instance);
コード例 #5
0
		private void detach_WorkOrderRouting(WorkOrderRouting entity)
		{
			this.SendPropertyChanging();
			entity.WorkOrder = null;
		}
コード例 #6
0
		private void attach_WorkOrderRouting(WorkOrderRouting entity)
		{
			this.SendPropertyChanging();
			entity.WorkOrder = this;
		}
コード例 #7
0
		private void attach_WorkOrderRouting1(WorkOrderRouting entity)
		{
			this.SendPropertyChanging();
			entity.Location1 = this;
		}
コード例 #8
0
ファイル: DB.cs プロジェクト: onartz/AmbifluxAdmin
        public static IDBItem AddNewItem(DataClassesDataContext dataContext, ItemType type)
        {
            IDBItem dataItem = null;

            if (type == ItemType.Equipment)
            {
                dataItem = new Equipment();

                dataContext.Resource.InsertOnSubmit(dataItem as Equipment);
            }

            if (type == ItemType.Employee)
            {
                dataItem = new Employee();
                dataContext.Resource.InsertOnSubmit(dataItem as Employee);
            }

            if (type == ItemType.Location)
            {
                dataItem = new Location();
                dataContext.Location.InsertOnSubmit(dataItem as Location);
            }

            if (type == ItemType.Container)
            {
                dataItem = new Container();
                dataContext.Container.InsertOnSubmit(dataItem as Container);
            }

            if (type == ItemType.Product)
            {
                dataItem = new Product();
                dataContext.Product.InsertOnSubmit(dataItem as Product);
            }

            if (type == ItemType.ProductCategory)
            {
                dataItem = new ProductCategory();
                dataContext.ProductCategory.InsertOnSubmit(dataItem as ProductCategory);
            }

            if (type == ItemType.DemandeExpress)
            {
                dataItem = new DemandeExpress();
                dataContext.OrderHeader.InsertOnSubmit(dataItem as DemandeExpress);
            }

            if (type == ItemType.Echange)
            {
                dataItem = new Echange();
                dataContext.OrderHeader.InsertOnSubmit(dataItem as Echange);
            }
            if (type == ItemType.WorkOrder)
            {
                dataItem = new WorkOrder();
                dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
            }
            if (type == ItemType.WorkOrderRouting)
            {
                dataItem = new WorkOrderRouting();
                dataContext.WorkOrderRouting.InsertOnSubmit(dataItem as WorkOrderRouting);
            }
            if (type == ItemType.Workstation)
            {
                dataItem = new Workstation();
                //dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
                dataContext.Resource.InsertOnSubmit(dataItem as Workstation);
            }
            if (type == ItemType.Customer)
            {
                dataItem = new Customer();
                //dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
                dataContext.Customer.InsertOnSubmit(dataItem as Customer);
            }
            if (type == ItemType.Contact)
            {
                dataItem = new Contact();
                dataContext.Contact.InsertOnSubmit(dataItem as Contact);
            }

            return dataItem;
        }
コード例 #9
0
        public static IDBItem AddNewItem(DataClassesDataContext dataContext, ItemType type)
        {
            IDBItem dataItem = null;

            if (type == ItemType.Equipment)
            {
                dataItem = new Equipment();

                dataContext.Resource.InsertOnSubmit(dataItem as Equipment);
            }

            if (type == ItemType.Employee)
            {
                dataItem = new Employee();
                dataContext.Resource.InsertOnSubmit(dataItem as Employee);
            }

            if (type == ItemType.Location)
            {
                dataItem = new Location();
                dataContext.Location.InsertOnSubmit(dataItem as Location);
            }

            if (type == ItemType.Container)
            {
                dataItem = new Container();
                dataContext.Container.InsertOnSubmit(dataItem as Container);
            }

            if (type == ItemType.Product)
            {
                dataItem = new Product();
                dataContext.Product.InsertOnSubmit(dataItem as Product);
            }

            if (type == ItemType.ProductCategory)
            {
                dataItem = new ProductCategory();
                dataContext.ProductCategory.InsertOnSubmit(dataItem as ProductCategory);
            }

            if (type == ItemType.DemandeExpress)
            {
                dataItem = new DemandeExpress();
                dataContext.OrderHeader.InsertOnSubmit(dataItem as DemandeExpress);
            }

            if (type == ItemType.Echange)
            {
                dataItem = new Echange();
                dataContext.OrderHeader.InsertOnSubmit(dataItem as Echange);
            }
            if (type == ItemType.WorkOrder)
            {
                dataItem = new WorkOrder();
                dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
            }
            if (type == ItemType.WorkOrderRouting)
            {
                dataItem = new WorkOrderRouting();
                dataContext.WorkOrderRouting.InsertOnSubmit(dataItem as WorkOrderRouting);
            }
            if (type == ItemType.Workstation)
            {
                dataItem = new Workstation();
                //dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
                dataContext.Resource.InsertOnSubmit(dataItem as Workstation);
            }
            if (type == ItemType.Customer)
            {
                dataItem = new Customer();
                //dataContext.WorkOrder.InsertOnSubmit(dataItem as WorkOrder);
                dataContext.Customer.InsertOnSubmit(dataItem as Customer);
            }
            if (type == ItemType.Contact)
            {
                dataItem = new Contact();
                dataContext.Contact.InsertOnSubmit(dataItem as Contact);
            }


            return(dataItem);
        }