Ejemplo n.º 1
0
        public static List <ExportBillDetail> GetCTDHByMaDH(int madh, DateTime day_bill)
        {
            List <ServiceExportBill_Detail.export_bill_detail> le = sExportBillDetail.GetExportBill_DetailByIdExportBill(madh).ToList();

            if (le == null)
            {
                return(null);
            }
            List <ExportBillDetail> listExport = new List <ExportBillDetail>();

            foreach (var item in le)
            {
                ExportBillDetail e = new ExportBillDetail();
                e.id_product     = item.id_product;
                e.id_export_bill = item.id_export_bill;
                e.number         = item.number;
                var pro = sProduct.GetProductById(item.id_product);
                e.name_product = pro.name;
                e.sale_price   = pro.sale_price;
                e.id_save      = pro.id_save;
                var save = sSave.GetSaveByIdAndDay(pro.id_save, day_bill);
                if (save != null)
                {
                    e.name_save = save.name;
                }
                //
                e.date = day_bill;
                listExport.Add(e);
            }
            return(listExport);
        }
 public static List<ExportBillDetail> GetCTDHByMaSP(int masp)
 {
     List<ServiceExportBill_Detail.export_bill_detail> le = sExportBillDetail.GetExportBill_DetailByIdProduct(masp).ToList();
     if (le == null) return null;
     List<ExportBillDetail> listExport = new List<ExportBillDetail>();
     foreach (ServiceExportBill_Detail.export_bill_detail item in le)
     {
         ExportBillDetail e = new ExportBillDetail();
         e.id_product = item.id_product;
         e.id_export_bill = item.id_export_bill;
         e.number = item.number;
         var pro = sProduct.GetProductById(item.id_product);
         e.name_product = pro.name;
         e.sale_price = pro.sale_price;
         listExport.Add(e);
     }
     return listExport;
 }
 public static List<ExportBillDetail> GetCTDHByMaDH(int madh, DateTime day_bill)
 {
     List<ServiceExportBill_Detail.export_bill_detail> le = sExportBillDetail.GetExportBill_DetailByIdExportBill(madh).ToList();
     if (le == null) return null;
     List<ExportBillDetail> listExport = new List<ExportBillDetail>();
     foreach (var item in le)
     {
         ExportBillDetail e = new ExportBillDetail();
         e.id_product = item.id_product;
         e.id_export_bill = item.id_export_bill;
         e.number = item.number;
         var pro = sProduct.GetProductById(item.id_product);
         e.name_product = pro.name;
         e.sale_price = pro.sale_price;
         e.id_save = pro.id_save;
         var save = sSave.GetSaveByIdAndDay(pro.id_save, day_bill);
         if(save != null) e.name_save = save.name;
         //
         e.date = day_bill;
         listExport.Add(e);
     }
     return listExport;
 }
Ejemplo n.º 4
0
        public static List <ExportBillDetail> GetCTDHByMaSP(int masp)
        {
            List <ServiceExportBill_Detail.export_bill_detail> le = sExportBillDetail.GetExportBill_DetailByIdProduct(masp).ToList();

            if (le == null)
            {
                return(null);
            }
            List <ExportBillDetail> listExport = new List <ExportBillDetail>();

            foreach (ServiceExportBill_Detail.export_bill_detail item in le)
            {
                ExportBillDetail e = new ExportBillDetail();
                e.id_product     = item.id_product;
                e.id_export_bill = item.id_export_bill;
                e.number         = item.number;
                var pro = sProduct.GetProductById(item.id_product);
                e.name_product = pro.name;
                e.sale_price   = pro.sale_price;
                listExport.Add(e);
            }
            return(listExport);
        }