Esempio n. 1
0
 public void SubmitForm(SupplierEntity supplierEntity, string keyValue)
 {
     if (!string.IsNullOrEmpty(keyValue))
     {
         supplierEntity.Modify(keyValue);
         service.Update(supplierEntity);
     }
     else
     {
         supplierEntity.Create();
         service.Insert(supplierEntity);
     }
 }
Esempio n. 2
0
        public async Task SaveForm(SupplierEntity entity)
        {
            if (entity.Id.IsNullOrZero())
            {
                await entity.Create();

                await this.BaseRepository().Insert(entity);
            }
            else
            {
                await entity.Modify();

                await this.BaseRepository().Update(entity);
            }
        }