Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 public List <EntityQuotation> GeListByOrder(List <int> OrderIDs)
 {
     return(FactoryQuotation.GetList(base.DataContext.Quotation.Where(p => OrderIDs.Contains(p.FK_OrdenID.Value)).ToList()));
 }
Esempio n. 5
0
 public List <EntityQuotation> GetAll()
 {
     return(FactoryQuotation.GetList(base.DataContext.Quotation.ToList()));
 }
Esempio n. 6
0
 public List <EntityQuotation> GetActives()
 {
     return(FactoryQuotation.GetList(base.DataContext.Quotation.Where(p => p.Status == true).ToList()));
 }
Esempio n. 7
0
 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()));
 }