Exemple #1
0
 public Task <int> SaveItemAsync(UbiNoc item)
 {
     if (item.ID != 0)
     {
         return(database.UpdateAsync(item));
     }
     else
     {
         return(database.InsertAsync(item));
     }
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
 public Task <List <tNumerosSerie> > GetSerials(UbiNoc ubinoci)
 {
     return(database.Table <tNumerosSerie>().Where(i => i.Noc == ubinoci.Noc && i.Ubicacion == ubinoci.Ubicacion).ToListAsync());
 }
Exemple #5
0
 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 + "';"));
 }
Exemple #6
0
 public Task <int> Set_UbiNoc_Error(UbiNoc ubinoci)
 {
     return(database.ExecuteAsync("Update [UbiNoc] set [Error]=1 where [Ubicacion]='" + ubinoci.Ubicacion + "' and [Noc]='" + ubinoci.Noc + "'"));
 }
Exemple #7
0
 public Task <int> SaveItemObs(UbiNoc item, string Obs)
 {
     return(database.ExecuteAsync("Update [UbiNoc] set [Obs]='" + Obs + "' where [ID]='" + item.ID + "';"));
     //return database.UpdateAsync(item);
 }