public EntityQuotation GetByOrdertype(int OrderID, int type) { var data = base.DataContext.Quotation.Where(p => p.FK_OrdenID == OrderID && p.FK_TypeQuotation == type); if (data.Count() == 1) { return(FactoryQuotation.Get(data.Single())); } else { return(null); } }
public EntityQuotation GetByOrderFolio(int OrderID, string Folio) { var data = base.DataContext.Quotation.Where(p => p.FK_OrdenID == OrderID && p.Folio == Folio); if (data.Count() == 1) { return(FactoryQuotation.Get(data.Single())); } else { return(null); } }
public EntityQuotation GetByID(int QuotationID) { var data = base.DataContext.Quotation.Where(p => p.PK_QuotationID == QuotationID); if (data.Count() == 1) { return(FactoryQuotation.Get(data.Single())); } else { return(null); } }
public List <EntityQuotation> GeListByOrder(List <int> OrderIDs) { return(FactoryQuotation.GetList(base.DataContext.Quotation.Where(p => OrderIDs.Contains(p.FK_OrdenID.Value)).ToList())); }
public List <EntityQuotation> GetAll() { return(FactoryQuotation.GetList(base.DataContext.Quotation.ToList())); }
public List <EntityQuotation> GetActives() { return(FactoryQuotation.GetList(base.DataContext.Quotation.Where(p => p.Status == true).ToList())); }
public List <EntityQuotation> GetByEmpoyeeDate(int UserID, DateTime date) { return(FactoryQuotation.GetList(base.DataContext.Quotation.Where(p => p.FK_EmployeeID == UserID && DbFunctions.TruncateTime(p.CreateDate) == date).OrderByDescending(o => o.CreateDate).ToList())); }