123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using DevExpress.XtraEditors;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Documents;
- using System.Windows.Forms;
- using DW5S.App.Model;
- using DW5S.Entity;
- using DW5S.Repostory;
- using Microsoft.Extensions.Logging;
- namespace DW5S.App.PopupControl
- {
- public partial class ShowCxCtrl : DevExpress.XtraEditors.XtraUserControl
- {
- [Autowired]
- private readonly ILogger logger;
- [Autowired]
- private readonly UnitOfWork unitOfWork;
- PosRes posItem;
- List<CxRes> list = new List<CxRes>();
- public ShowCxCtrl()
- {
- InitializeComponent();
- gridShowCx.UseDefault(list);
- }
- public ShowCxCtrl(PosRes posItem)
- : this()
- {
- this.posItem = posItem;
- }
- private async void ShowCxCtrl_Load(object sender, EventArgs e)
- {
- var repsCx = unitOfWork.Of<CxRes>();
- var items =await repsCx.FindAsync(p => p.Id == posItem.CxResID);
- this.list.AddRange(items);
- gridView1.RefreshData();
- }
- }
- }
|