| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Judge.Commons;
- using CoreFS.CA06;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Judge.Controls
- {
- public partial class QcmZbsCraftResultCtrl : UserControl
- {
- private Dal _d;
- public QcmZbsCraftResultCtrl(Control container, OpeBase ob)
- {
- InitializeComponent();
- container.Controls.Add(this);
- this.Dock = DockStyle.Fill;
- _d = new Dal(ob);
- }
- public void Query(string zbsId)
- {
- DataTable dt = _d.GetTableByXmlId("JdgQcmZbsCraftResult.getByZbsId", zbsId);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSize(ultraGrid1);
- }
- public void Modify()
- {
- List<string> jsons = new List<string>();
- foreach (DataRow dr in dataTable1.Rows)
- {
- if (dr["chk"].ToString() == "False") continue;
- jsons.Add(JsonHelper.ToJson(dr));
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认修改?") == DialogResult.No)
- {
- return;
- }
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllCreateZbsInfo.modifyZbsCraft", jsons);
- if (ccp.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2());
- }
- else
- {
- MessageUtil.ShowTips("修改成功!");
- }
- }
- public void ClearData()
- {
- dataTable1.Clear();
- }
- private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- e.Cell.Row.Update();
- }
- }
- }
|