Ejemplo n.º 1
0
 public async Task <IActionResult> Post([FromBody] OfficeTable value)
 {
     if (value != null)
     {
         return(Ok(await _repository.CreateAsync(value)));
     }
     return(BadRequest());
 }
Ejemplo n.º 2
0
 public async Task PutAsync(Guid id, [FromBody] OfficeTable value)
 {
     if (id != Guid.Empty)
     {
         if (id == value.Id && await _repository.DoesItemExist(id))
         {
             await _repository.UpdateAsync(value);
         }
     }
 }
	    public void Insert(string OfficeName,int? CountryID,int? CompanyID,byte[] Ts)
	    {
		    OfficeTable item = new OfficeTable();
		    
            item.OfficeName = OfficeName;
            
            item.CountryID = CountryID;
            
            item.CompanyID = CompanyID;
            
            item.Ts = Ts;
            
	    
		    item.Save(UserName);
	    }
	    public void Update(int OfficeID,string OfficeName,int? CountryID,int? CompanyID,byte[] Ts)
	    {
		    OfficeTable item = new OfficeTable();
	        item.MarkOld();
	        item.IsLoaded = true;
		    
			item.OfficeID = OfficeID;
				
			item.OfficeName = OfficeName;
				
			item.CountryID = CountryID;
				
			item.CompanyID = CompanyID;
				
			item.Ts = Ts;
				
	        item.Save(UserName);
	    }