using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Infragistics.Win.UltraWinGrid; namespace Core.StlMes.Client.SaleOrder.Control { public partial class DesignStatus : UserControl { public DesignStatus() { InitializeComponent(); } public void DoQuery(String ordNo, OpeBase ob) { DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CoreConReviewInfo.getReviewInfomation", new Object[] { ordNo }, ob); GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true); SetColor(ultraGridStatus, ob); updateListItem(); } public void DoQuery(String ordNo, String ordLnPk, OpeBase ob) { DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CoreConReviewInfo.getReviewInfomation", new Object[] { ordNo, ordLnPk }, ob); GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true); SetColor(ultraGridStatus, ob); updateListItem(); } public void DoClear() { dataTable1.Clear(); } private void SetColor(UltraGrid ug, OpeBase ob) { foreach (UltraGridRow ugr in ug.Rows) { if (ugr.Cells["IS_CURT_REVIEW"].Value.ToString().Equals("否")) { ugr.Appearance.ForeColor = Color.Red; } else { if (ugr.Cells["REVIEW_ITM"].Value.ToString().Equals("技术") && ugr.Cells["REVIEW_STATUS"].Value.ToString().Equals("评审中")) { DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CoreConReviewInfo.getLastQualityDept", new Object[] { ugr.Cells["LIST_PK_VAL"].Text.Trim() }, ob); if (dt != null && dt.Rows.Count > 0) { ugr.Cells["REVIEW_DEPT"].Value = dt.Rows[0][0].ToString(); } } } } } private void updateListItem() { foreach (UltraGridRow ugr in ultraGridStatus.Rows) { if (ugr.Cells["RT_REVIEW_ITM"].Value.ToString().Contains("业务主管") && !ugr.Cells["ORDER_NO"].Value.ToString().StartsWith("TH")) { ugr.Cells["REVIEW_ITM"].Value = "价格(业务主管)"; } if (ugr.Cells["RT_REVIEW_ITM"].Value.ToString().Contains("主管经理") && ugr.Cells["REVIEW_ITM"].Value.ToString().Contains("价格")) { ugr.Cells["REVIEW_ITM"].Value = "价格(主管经理)"; } } } } }