using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.Judge.Commons; using Core.StlMes.Client.Judge.Controls; using CoreFS.CA06; using System; namespace Core.StlMes.Client.Judge.Forms { public partial class QcmRolledJhyPassConfigFrm : FrmBase { private QcmJhyPassConfigCtrl _bcPassConfigCtrl; private Dal _d; public QcmRolledJhyPassConfigFrm() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { base.ToolBar_Click(sender, ToolbarKey); switch (ToolbarKey) { case "Query": Query(); break; case "Save": Save(); break; case "Delete": Delete(); break; case "Close": this.Close(); break; } } private void QcmRolledTubePassConfigFrm_Load(object sender, EventArgs e) { _d = new Dal(ob); _bcPassConfigCtrl = new QcmJhyPassConfigCtrl(this, ob); } private void Query() { _bcPassConfigCtrl.Query(); } private void Save() { if (_bcPassConfigCtrl.UltraGrid1.ActiveRow == null) { MessageUtil.ShowWarning("请选择记录!"); return; } if (_bcPassConfigCtrl.UltraGrid1.ActiveRow.GetValue("type") == "") { MessageUtil.ShowWarning("请选择类型!", _bcPassConfigCtrl.UltraGrid1, _bcPassConfigCtrl.UltraGrid1.ActiveRow.Cells["type"]); return; } if (_bcPassConfigCtrl.UltraGrid1.ActiveRow.GetValue("judgeResult") == "") { MessageUtil.ShowWarning("请选择判定结果!", _bcPassConfigCtrl.UltraGrid1, _bcPassConfigCtrl.UltraGrid1.ActiveRow.Cells["judgeResult"]); return; } if (_bcPassConfigCtrl.UltraGrid1.ActiveRow.GetValue("auditUnitDesc") == "") { MessageUtil.ShowWarning("请选择审核科室!", _bcPassConfigCtrl.UltraGrid1, _bcPassConfigCtrl.UltraGrid1.ActiveRow.Cells["auditUnitDesc"]); return; } if (MessageUtil.ShowYesNoAndQuestion("是否确认保存?") == System.Windows.Forms.DialogResult.No) { return; } var row = _bcPassConfigCtrl.UltraGrid1.ActiveRow; string[] parm = new string[] { row.GetValue("judgeResult"), row.GetValue("auditStep"), row.GetValue("auditUnit"), row.GetValue("type") }; var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledJhyPassApply.passConfigSave", new object[] { parm }); if (ccp.ReturnInfo != "") { MessageUtil.ShowError(ccp.ReturnInfo); return; } MessageUtil.ShowTips("保存成功!"); _bcPassConfigCtrl.Query(); } private void Delete() { if (_bcPassConfigCtrl.UltraGrid1.ActiveRow == null) { MessageUtil.ShowWarning("请选择记录!"); return; } var row = _bcPassConfigCtrl.UltraGrid1.ActiveRow; if (row.GetValue("auditStep") == "") { MessageUtil.ShowWarning("没保存的记录不需要删除!"); return; } if (MessageUtil.ShowYesNoAndQuestion("是否确认删除?") == System.Windows.Forms.DialogResult.No) { return; } string[] parm = new string[] { row.GetValue("judgeResult"), row.GetValue("auditStep"), row.GetValue("type") }; var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledJhyPassApply.passConfigDelete", new object[] { parm }); if (ccp.ReturnInfo != "") { MessageUtil.ShowError(ccp.ReturnInfo); return; } MessageUtil.ShowTips("删除成功!"); _bcPassConfigCtrl.Query(); } } }