| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Data;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Qcm
- {
- class DtMscBl : DtBaseQcm
- {
- private CtrlMscBl _ctrlMscBl;
- private UltraGridRow[] _rows;
- public DtMscBl(CtrlMscBl ctrlMscBl)
- {
- _ctrlMscBl = ctrlMscBl;
- RegistQuery(Query, "DefaultQuery");
- RegistAction(Add, ActionType.Add);
- RegistAction(Modify, ActionType.Modify);
- RegistAction(Save, ActionType.Save);
- RegistAction(Delete, ActionType.Delete);
- RegistAction(Resume, ActionType.Resume);
- RegistAction(SubMitAudit, ActionType.SubMitAudit);
- RegistAction(Audit, ActionType.Audit);
- RegistAction(Group, ActionType.Group);
- }
- protected void Query()
- {
- FrmProPSCMSC2 frm = _ctrlMscBl.FrmProPscMsc2;
- UltraGrid gridMsc = frm.ControlMsc.GridMsc;
- CheckBox checkBox = frm.ckbDeleteFilter;
- if (gridMsc.ActiveRow == null) return;
- string msc = frm.ControlMsc.MscRow.Cells["MSC"].Value.ToString();
- ArrayList list = new ArrayList();
- list.Add(msc);
- DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.BLCodeManage.queryWithMsc",
- new Object[] { list }, frm.ob);
- GridHelper.CopyDataToDatatable(dt, _ctrlMscBl.DataTableBl, true);
- GridHelper.RefreshAndAutoSize(_ctrlMscBl.GridBl);
- }
- protected bool Add()
- {
- throw new NotImplementedException();
- }
- protected bool Group()
- {
- FrmProPSCMSC2 frm = _ctrlMscBl.FrmProPscMsc2;
- ArrayList list = new ArrayList();
- PopupGroup popupGroup = new PopupGroup();
- if (popupGroup.ShowDialog() == DialogResult.OK)
- {
- foreach (UltraGridRow row in _rows)
- {
- ArrayList listSub = new ArrayList();
- listSub.Add(popupGroup.NumGroupNum.Value.ToString());
- listSub.Add(row.Cells["MSC"].Value.ToString());
- listSub.Add(row.Cells["PSC_BL"].Value.ToString());
- list.Add(listSub);
- }
- ServerHelper.SetData("com.steering.pss.qcm.BLCodeManage.group", new object[] { list }, frm.ob);
- }
- else
- {
- return false;
- }
- return true;
- }
- protected bool Modify()
- {
- throw new NotImplementedException();
- }
- protected bool Save()
- {
- throw new NotImplementedException();
- }
- protected bool Delete()
- {
- throw new NotImplementedException();
- }
- protected bool Resume()
- {
- throw new NotImplementedException();
- }
- protected bool SubMitAudit()
- {
- throw new NotImplementedException();
- }
- protected bool Audit()
- {
- throw new NotImplementedException();
- }
- protected override bool CheckData(ActionType actionType, out ArrayList parm, out string msg)
- {
- msg = "";
- parm = new ArrayList();
- UltraGrid gridMsc = _ctrlMscBl.FrmProPscMsc2.ControlMsc.GridMsc;
- if (gridMsc.ActiveRow == null)
- {
- msg = "请先维护冶金规范,然后再进行操作!";
- return false;
- }
- return true;
- }
- protected ArrayList[] GetParms(ActionType actionType)
- {
- return new ArrayList[1];
- }
- protected override bool IsSelectData(ActionType actionType, out string msg)
- {
- msg = "";
- _rows = GridHelper.GetRowsWithKey(_ctrlMscBl.GridBl,
- new string[] { "CHK" }, new string[] { "True" });
- if (_rows.Length == 0)
- {
- return false;
- }
- return true;
- }
- private static DataTable GetMscTabByMsc(string msc, OpeBase ob)
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.CoreFrmProPSCMSC2.getComMscByMsc",
- new object[] { msc }, ob);
- return dt;
- }
- }
- }
|