Example #1
0
        public bool Put(int id, [FromBody] LayingItem layingItem)
        {
            if ((layingItem == null) ||
                (layingItem.ProcedureBusinessItemId == 0) ||
                (layingItem.ProcedureWorkPackagedId == 0))
            {
                return(false);
            }
            CommandDefinition command = new CommandDefinition(@"update ProcedureLaying
                set ProcedureBusinessItemId=@ProcedureBusinessItemId,
                    ProcedureWorkPackagedId=@ProcedureWorkPackagedId,
                    LayingDate=@LayingDate,
                    LayingBodyId=@LayingBodyId,
                    PersonTripleStoreId=@PersonTripleStoreId,
                    ModifiedBy=@ModifiedBy,
                    ModifiedAt=@ModifiedAt
                where Id=@Id",
                                                              new
            {
                ProcedureBusinessItemId = layingItem.ProcedureBusinessItemId,
                ProcedureWorkPackagedId = layingItem.ProcedureWorkPackagedId,
                LayingDate          = layingItem.LayingDate,
                LayingBodyId        = layingItem.LayingBodyId,
                PersonTripleStoreId = layingItem.PersonTripleStoreId,
                ModifiedBy          = EMail,
                ModifiedAt          = DateTimeOffset.UtcNow,
                Id = id
            });

            return(Execute(command));
        }
Example #2
0
        public bool Post([FromBody] LayingItem layingItem)
        {
            if ((layingItem == null) ||
                (layingItem.ProcedureBusinessItemId == 0) ||
                (layingItem.ProcedureWorkPackagedId == 0))
            {
                return(false);
            }
            CommandDefinition command = new CommandDefinition(@"insert into ProcedureLaying
                (ProcedureBusinessItemId, ProcedureWorkPackagedId,
	                LayingDate, LayingBodyId, PersonTripleStoreId,
                    ModifiedBy,ModifiedAt)
                values(@ProcedureBusinessItemId, @ProcedureWorkPackagedId,
	                @LayingDate, @LayingBodyId, @PersonTripleStoreId,
                    @ModifiedBy,@ModifiedAt)",
                                                              new
            {
                ProcedureBusinessItemId = layingItem.ProcedureBusinessItemId,
                ProcedureWorkPackagedId = layingItem.ProcedureWorkPackagedId,
                LayingDate          = layingItem.LayingDate,
                LayingBodyId        = layingItem.LayingBodyId,
                PersonTripleStoreId = layingItem.PersonTripleStoreId,
                ModifiedBy          = EMail,
                ModifiedAt          = DateTimeOffset.UtcNow
            });

            return(Execute(command));
        }
Example #3
0
 internal void TakeItem(LayingItem item)
 {
     HelpingText.text = "Pick up (x" + item.ItemsCount + ") [" + _getItemKey + ']';
     if (Input.GetKeyDown(_getItemKey))
     {
         if (_inventory.AddItems(item.Type, item.ItemsCount, true) == true)
         {
             item.GetItem();
         }
     }
 }