| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- 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 QcmRolledTubePassConfigFrm : FrmBase
- {
- private QcmBcPassConfigCtrl _bcPassConfigCtrl;
- private Dal _d;
- public QcmRolledTubePassConfigFrm()
- {
- 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 QcmBcPassConfigCtrl(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 (_bcPassConfigCtrl.UltraGrid1.ActiveRow.GetValue("seamArea") == "")
- {
- MessageUtil.ShowWarning("请选择所属区域!", _bcPassConfigCtrl.UltraGrid1, _bcPassConfigCtrl.UltraGrid1.ActiveRow.Cells["seamArea"]);
- 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"),row.GetValue("seamArea") };
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubePassApply.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"), row.GetValue("seamArea") };
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubePassApply.passConfigDelete", new object[] { parm });
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowError(ccp.ReturnInfo);
- return;
- }
- MessageUtil.ShowTips("删除成功!");
- _bcPassConfigCtrl.Query();
- }
- }
- }
|