ÎļþÃû´Ó DevApp/Gs.DevApp/UserControl/SelectCheckDt.cs ÐÞ¸Ä |
| | |
| | | using System.Data; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.Charts.Native; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | private readonly string _webServiceName = "MesQmCheckitemManager/"; |
| | | |
| | | private string _inP2Type = ""; |
| | | public SelectCheckDt(string inP2Type) |
| | | private string _jyxm = ""; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="inJyxm">å½ä¸ºï¼jyxmæ¶ï¼ç»è®¡æ£éªé¡¹ç®çé
置次æ°</param> |
| | | public SelectCheckDt(string inJyxm) |
| | | { |
| | | InitializeComponent(); |
| | | _inP2Type = inP2Type; |
| | | _jyxm = inJyxm; |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | var list = new List<dynamic>(); |
| | | for (var i = 0; i < gridView1.DataRowCount; i++) |
| | | { |
| | | var checkBox = gridView1.GetRowCellDisplayText(i, "gvChk"); |
| | | if (checkBox == "Checked") |
| | | int[] rows = this.gridView1.GetSelectedRows();//å
è·åéæ©è¡çè¡å· |
| | | DataTable dt = this.gcMain.DataSource as DataTable;//å¾å°GridControlçæ°æ®æº |
| | | foreach (int idx in rows) |
| | | { |
| | | list.Add(new |
| | | { |
| | | guid = gridView1.GetRowCellValue(i, "guid").ToString(), |
| | | fSubsidiary = gridView1.GetRowCellValue(i, "fSubsidiary").ToString(), |
| | | id = gridView1.GetRowCellValue(i, "id").ToString(), |
| | | itemNo = gridView1.GetRowCellValue(i, "itemNo").ToString(), |
| | | itemName = gridView1.GetRowCellValue(i, "itemName").ToString(), |
| | | itemModel = gridView1.GetRowCellValue(i, "itemModel").ToString(), |
| | | guid = dt.Rows[idx]["guid"].ToString(), |
| | | fSubsidiary = dt.Rows[idx]["fSubsidiary"].ToString(), |
| | | id = dt.Rows[idx]["id"].ToString(), |
| | | itemNo = dt.Rows[idx]["itemNo"].ToString(), |
| | | itemName = dt.Rows[idx]["itemName"].ToString(), |
| | | itemModel = dt.Rows[idx]["itemModel"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | | UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); |
| | | Close(); |
| | |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_no", "asc", "", _sbSqlWhere.ToString(), _inP2Type); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_no", "asc", "", _sbSqlWhere.ToString(), _jyxm); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |