Esempio n. 1
0
 public async Task <List <SP_ReportByStatusID> > GetReportByStatusID(long id, string endDate)
 {
     try
     {
         return(await db.Set <SP_ReportByStatusID>().FromSql("EXEC sp_ReportByStatusID {0},{1}", id, endDate).AsNoTracking().ToListAsync());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
        public List <SP_MerkByKotaID> GetMerkByKotaID(long KotaID)
        {
            if (db != null)
            {
                try
                {
                    return(db.Set <SP_MerkByKotaID>().FromSql("EXEC sp_MerkByKotaID {0}",
                                                              KotaID).AsNoTracking().ToList());
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            return(null);
        }
Esempio n. 3
0
        public async Task <sp_GetUserDetail> GetSalesmanById(int id)
        {
            if (db != null)
            {
                return(await db.Set <sp_GetUserDetail>().FromSql("EXEC sp_GetUserDetail {0}", id).AsNoTracking().FirstOrDefaultAsync());
            }

            return(null);
        }
Esempio n. 4
0
 public async Task <List <SP_CMSMaster> > GetAllCMSMaster()
 {
     if (db != null)
     {
         try
         {
             return(db.Set <SP_CMSMaster>().FromSql("EXEC sp_GetCMSMasterData").AsNoTracking().ToList());
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
     return(null);
 }
Esempio n. 5
0
        public async Task <List <sp_GetWarnaWithTypeBarang> > GetAllWithTypeBarang(long typeBarangID)
        {
            if (db != null)
            {
                try
                {
                    return(await db.Set <sp_GetWarnaWithTypeBarang> ().FromSql("EXEC sp_GetWarnaWithType {0}", typeBarangID).AsNoTracking().ToListAsync());
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            return(null);
        }
Esempio n. 6
0
        public async Task <List <SP_ModelByKotaIDMerkID> > GetModelByKotaIDMerkID(ModelBarangRequest model)
        {
            if (db != null)
            {
                try
                {
                    return(await db.Set <SP_ModelByKotaIDMerkID>().FromSql("EXEC sp_ModelByKotaIDMerkID {0},{1}",
                                                                           model.KotaID, model.MerkID).AsNoTracking().ToListAsync());
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            return(null);
        }
Esempio n. 7
0
        public async Task <List <SP_TypeByKotaIDMerkIDModelID> > GetTypeByKotaIDMerkIDModelID(TypeBarangRequest request)
        {
            if (db != null)
            {
                try
                {
                    return(await db.Set <SP_TypeByKotaIDMerkIDModelID>().FromSql("EXEC sp_TypeByKotaIDMerkIDModelID {0},{1},{2}",
                                                                                 request.KotaID, request.MerkID, request.ModelBarangID).AsNoTracking().ToListAsync());
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }

            return(null);
        }
Esempio n. 8
0
 public List <Car> GetLowestAsk(string kota, int total)
 {
     if (db != null)
     {
         try
         {
             return(db.Set <Car>().FromSql("EXEC sp_GetLowestAsk {0}, {1}", kota, total).AsNoTracking().ToList());
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
     return(null);
 }