1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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.Entity;
- using DW5S.Repostory;
- using Serilog;
- using DW5S.Service;
- using DW5S.ViewModel;
- namespace DW5S.App.PopupControl
- {
- public partial class ShowCxCtrl : DevExpress.XtraEditors.XtraUserControl
- {
- PosResViewModel posItem;
- List<CxRes> list = new List<CxRes>();
- public ShowCxCtrl()
- {
- InitializeComponent();
- gridShowCx.UseDefault(list);
- }
- public ShowCxCtrl(PosResViewModel posItem)
- : this()
- {
- this.posItem = posItem;
- }
- private async void ShowCxCtrl_Load(object sender, EventArgs e)
- {
- var repsPos = IocContainer.UnitOfWork.OfLong<PosRes>();
- var pos = await repsPos.GetByIdAsync(this.posItem.Id);
- var unitOfWork = IocContainer.UnitOfWork;
- var repsCx = unitOfWork.OfLong<CxRes>();
- var items =await repsCx.FindAsync(p => p.Id == pos.CxResID);
- this.list.AddRange(items);
- gridView1.RefreshData();
- }
- }
- }
|