public Task <int> SaveItemAsync(UbiNoc item) { if (item.ID != 0) { return(database.UpdateAsync(item)); } else { return(database.InsertAsync(item)); } }
public Task <int> GetNumsSerie(UbiNoc auditado) { try { var g = database.ExecuteScalarAsync <int>("Select Count(NOC) as Num from [tNumerosSerie] where [NOC]='" + auditado.Noc + "' and [Ubicacion]='" + auditado.Ubicacion + "'"); return(g); } catch { return(null); } }
public Task <int> GetNum_NOCheckNS(UbiNoc auditado) { try { // var g= await database.ExecuteScalarAsync<int>("Select Count(Ubicacion) from UbiNoc"); var g = database.ExecuteScalarAsync <int>("Select Count(NOC) as Num from [tNumerosSerie] where [NOC]='" + auditado.Noc + "' and [Ubicacion]='" + auditado.Ubicacion + "' and [Check]=0"); return(g); } catch { return(null); } }
public Task <List <tNumerosSerie> > GetSerials(UbiNoc ubinoci) { return(database.Table <tNumerosSerie>().Where(i => i.Noc == ubinoci.Noc && i.Ubicacion == ubinoci.Ubicacion).ToListAsync()); }
public Task <int> Set_NsErrorcheck(UbiNoc ubinoci) { return(database.ExecuteAsync("Update [tNumerosSerie] set [Check]=1, [Error]=1 where [Check]=0 and [Ubicacion]='" + ubinoci.Ubicacion + "' and [Noc]='" + ubinoci.Noc + "';")); }
public Task <int> Set_UbiNoc_Error(UbiNoc ubinoci) { return(database.ExecuteAsync("Update [UbiNoc] set [Error]=1 where [Ubicacion]='" + ubinoci.Ubicacion + "' and [Noc]='" + ubinoci.Noc + "'")); }
public Task <int> SaveItemObs(UbiNoc item, string Obs) { return(database.ExecuteAsync("Update [UbiNoc] set [Obs]='" + Obs + "' where [ID]='" + item.ID + "';")); //return database.UpdateAsync(item); }