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; } }
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); }
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); }
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); }
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); }
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); }
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); }
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); }