1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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;
- namespace DW5S.App.PopupControl
- {
- public partial class ShowCxCtrl : DevExpress.XtraEditors.XtraUserControl
- {
- 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)
- {
- using (RHDWPartContext db = RHDWPartContext.GetContext(posItem.SigTime))
- {
- if (db == null) return;
- var items = await db.CxRes.Where(p => p.ID == posItem.CxResID).ToListAsync();
- this.list.AddRange(items);
- }
- gridView1.RefreshData();
- }
- }
- }
|