| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using Core.Mes.Client.Comm.Control;
- using Core.StlMes.Client.Judge.Commons;
- using CoreFS.CA06;
- using CoreFS.SA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Data;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Judge.Controls
- {
- public partial class QcmZcPassApplyCtrl : UserControl
- {
- private Dal _d;
- private OpeBase ob;
- private string _unitCode;
- public QcmZcPassApplyCtrl(Control container, OpeBase ob, string unitCode)
- {
- InitializeComponent();
- _d = new Dal(ob);
- this.ob = ob;
- _unitCode = unitCode;
- container.Controls.Add(this);
- this.Dock = DockStyle.Fill;
- this.BringToFront();
- }
- public void AuditeQuery(string judgeStoveNo, string batchNo, string timeB, string timeE, string passType,
- string auditState, string validflag)
- {
- DataTable dt;
- dt = _d.GetTableByXmlId("QcmZcPassApplyDAL.auditeQuery", judgeStoveNo, batchNo, timeB, timeE, auditState,
- passType, validflag, CoreUserInfo.UserInfo.GetUserName(), _unitCode);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSize(ultraGrid1);
- }
- public void AllQuery(string judgeStoveNo, string batchNo, string timeB, string timeE,
- string passType, string validflag)
- {
- DataTable dt = _d.GetTableByXmlId("QcmZcPassApplyDAL.allQuery", judgeStoveNo,
- batchNo, timeB, timeE, passType, validflag);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSize(ultraGrid1);
- }
- private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- e.Cell.Row.Update();
- }
- private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
- {
- Color yellow = Color.FromArgb(238, 238, 0);
- Color red = Color.FromArgb(255, 106, 106);
- Color green = Color.FromArgb(60, 179, 113);
- if (e.Row.GetValue("validflag") == "0")
- {
- e.Row.RowSelectorAppearance.BackColor = Color.Red;
- }
- if (e.Row.GetValue("auditResult") == "审核通过")
- {
- e.Row.RowSelectorAppearance.BackColor = green;
- }
- else if (e.Row.GetValue("auditResult") == "审核通过")
- {
- e.Row.RowSelectorAppearance.BackColor = yellow;
- }
- else if (e.Row.GetValue("auditResult") == "审核不通过")
- {
- e.Row.RowSelectorAppearance.BackColor = red;
- }
- }
- FormFileDown askDown;
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- string filePath = ultraGrid1.ActiveRow.GetValue("craftPath");
- askDown = new FormFileDown(ob, filePath);
- askDown.DeleteButton.Visible = false;
- askDown.Show();
- }
- private void ultraGrid1_MouseUp(object sender, MouseEventArgs e)
- {
- foreach (UltraGridRow row in ultraGrid1.Rows)
- {
- if (row.Selected)
- {
- row.Cells["CHK"].Value = true;
- }
- }
- ultraGrid1.UpdateData();
- }
- }
- }
|