コード例 #1
0
ファイル: ReportService.cs プロジェクト: ademaydogdu/msp
 public List <OrderOwnerDTO> GetList_OrderSevk(Models.Models.Report.OrderRequest request)
 {
     using (var _db = new MspDbContext())
     {
         List <OrderOwnerDTO> result = new List <OrderOwnerDTO>();
         result = base.Map <List <OrderOwner>, List <OrderOwnerDTO> >(_db.OrderOwner.Where(x => x.OrderType == request.OrderType && x.Deleted == false && x.SiparisDate >= request.BeginDate && x.SiparisDate <= request.EndDate && x.IrsaliyeId != 0).ToList());
         return(result);
     }
 }
コード例 #2
0
 private void do_report(bool report)
 {
     try
     {
         var req = new Models.Models.Report.OrderRequest
         {
             OrderType = (int)orderFilter,
             BeginDate = dt_BeginDate.DateTime,
             EndDate   = new DateTime(dt_EndDate.DateTime.Year, dt_EndDate.DateTime.Month, dt_EndDate.DateTime.Day, 23, 59, 00),
         };
         if (orderFilter == OrderFilter.Siparis)
         {
             List_OrderOwner = _repository.Run <ReportService, List <OrderOwnerDTO> >(x => x.GetList_Order(req));
             if (List_OrderOwner.Count > 0)
             {
                 gridControl1.DataSource = List_OrderOwner;
                 if (report)
                 {
                 }
             }
             else
             {
                 XtraMessageBox.Show("Kayıt Bulunamadı...", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         if (orderFilter == OrderFilter.SevkRapor)
         {
             List_OrderOwner = _repository.Run <ReportService, List <OrderOwnerDTO> >(x => x.GetList_OrderSevk(req));
             if (List_OrderOwner.Count > 0)
             {
                 gridControl1.DataSource = List_OrderOwner;
                 if (report)
                 {
                 }
             }
             else
             {
                 XtraMessageBox.Show("Kayıt Bulunamadı...", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
     }
     catch (Exception)
     {
     }
 }