| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.Mes.Client.Comm.Tool;
- using System.Collections;
- using Core.StlMes.Client.YdmStuffManage.Entity;
- using Infragistics.Win.UltraWinGrid;
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Server;
- using Infragistics.Win;
- namespace Core.StlMes.Client.YdmStuffManage
- {
- public partial class FrmStuffInputStore : FrmBase
- {
- public FrmStuffInputStore()
- {
- InitializeComponent();
- }
- string strInBound = "800701";
- private string[] arr = null;
- private void FrmStuffInputStore_Load(object sender, EventArgs e)
- {
- DateTime now = DateTime.Now;
- DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
- DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
- this.StartTime.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
- this.EndTime.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
- BaseMethod.InitCellPosition(entityGrid2, new string[] { "ActWeight", "ActCount","ActLen", "FixNum", "FixLen", "Dimater" });
- arr = BaseMethod.InitLgPermissions(this.ValidDataPurviewIds,"B", this.ob);
-
- //BaseMethod.InitCellPosition(entityGrid3, new string[] { "ActWeight", "ActCount", "ActLenMax", "ActLenMin", "actLen", "actFixNum", "actFixLen", "ActDimater" });
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- doQueryPlan();
- break;
- case"QueryInList":
- doQueryInList();
- break;
- case "Receive":
- //ReceiveData();
- break;
- case "CancelReceive":
- //CancelReceive();
- break;
- case"EnsureInPut":
- EnsureInPutData();
- break;
- case"CancelInPut":
- CancelInPutData();
- break;
- case"WasteCount":
- wasteCount();
- break;
- case"DoBeside":
- doBeside();
- break;
- case "CancelDoBeside":
- cancelDoBeside();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
-
- /// <summary>
- /// 结炉
- /// </summary>
- private void doBeside()
- {
- this.entityGrid1.UpdateData();
- UltraGridRow uRow = this.entityGrid1.ActiveRow;
- if (uRow == null)
- {
- return;
- }
- if (!uRow.Cells["CcmState"].Text.Equals("表检完成"))
- {
- MessageUtil.ShowTips("表检未完成,不允许结炉!");
- return;
- }
- ArrayList parm = new ArrayList();
- parm.Add(uRow.Cells["Furnaceno"].Text);
- parm.Add(uRow.Cells["Sequenceno"].Text);
- parm.Add(uRow.Cells["StoveNo"].Text);
- parm.Add(uRow.Cells["JudgeStoveNoSeq"].Text);
- DataTable ds = ServerHelper.GetData("Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.doQueryRecive", new object[] { parm }, ob);
- if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- {
- MessageUtil.ShowTips("还有未入库的管坯,不允许结炉!");
- return;
- }
- PlnSteelforOrdEntity plnOrdEntity = (PlnSteelforOrdEntity)uRow.ListObject;
- string plnOrdTity = JSONFormat.Format(plnOrdEntity);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "doBeside";
- ccp.ServerParams = new object[] { plnOrdTity };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("结炉成功!"))
- {
- doQueryPlan();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- //ServerHelper.SetData("Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.doBeside", new object[] { plnOrdTity }, ob);
- //doQueryPlan();
- //MessageUtil.ShowTips("结炉成功!");
- }
- /// <summary>
- /// 结炉回退
- /// </summary>
- private void cancelDoBeside()
- {
- this.entityGrid1.UpdateData();
- UltraGridRow uRow = this.entityGrid1.ActiveRow;
- if (uRow == null)
- {
- return;
- }
- if (!uRow.Cells["CcmState"].Text.Equals("入库完成"))
- {
- MessageUtil.ShowTips("入库未完成,不允许结炉回退!");
- return;
- }
- ArrayList parm = new ArrayList();
- parm.Add(uRow.Cells["Furnaceno"].Text);
- parm.Add(uRow.Cells["Sequenceno"].Text);
- parm.Add(uRow.Cells["StoveNo"].Text);
- parm.Add(uRow.Cells["JudgeStoveNo"].Text);
- DataTable ds = ServerHelper.GetData("Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.doQueryMatJudgeApp", new object[] { parm }, ob);
- if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- {
- MessageUtil.ShowTips("该炉已申请判定,不允许结炉回退!");
- return;
- }
- PlnSteelforOrdEntity plnOrdEntity = (PlnSteelforOrdEntity)uRow.ListObject;
- string plnOrdTity = JSONFormat.Format(plnOrdEntity);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "cancelDoBeside";
- ccp.ServerParams = new object[] { plnOrdTity };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("结炉回退成功!"))
- {
- doQueryPlan();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
-
- }
- /// <summary>
- /// 交库前剔废
- /// </summary>
- private void wasteCount()
- {
- UltraGridRow uRow = this.entityGrid1.ActiveRow;
- if (uRow == null) return;
- //if (uRow.HasChild())
- //{
- // return;
- //}
- ArrayList parmList = new ArrayList();
- parmList.Add(uRow.Cells["Furnaceno"].Text);
- parmList.Add(uRow.Cells["Sequenceno"].Text);
- parmList.Add(uRow.Cells["StoveNo"].Text);
- parmList.Add(uRow.Cells["JudgeStoveNoSeq"].Text);
- DataTable ds = ServerHelper.GetData("Core.LgMes.Server.Stuffmanage.FrmStuffSurfaceResult.doQueryPlnSteeOrd", new object[] { parmList }, ob);
- if (!ds.Rows[0]["CCM_STATE"].ToString().Equals("20"))
- {
- MessageUtil.ShowTips("执行状态不是表检完成,不允许进行下线点剔废!");
- return;
- }
- WasteFrom waste = new WasteFrom(parmList,ob);
- waste.ShowDialog();
- doQueryPlan();
- }
- /// <summary>
- /// 查询炉计划
- /// </summary>
- private void doQueryPlan()
- {
- string[] L1 = new string[] { "Furnaceno" };
- string[] L2 = new string[] { "Furnaceno" };
- string startTim = "";
- string endTim = "";
- string stoveNo = "";
- if (this.chkTim.Checked)
- {
- startTim = this.StartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
- endTim = this.EndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- if (!CheckQuery())
- {
- return;
- }
- if (this.chkStoveNo.Checked && this.txtStoveNo.Text.Trim() != "")
- {
- stoveNo = this.txtStoveNo.Text.Trim();
- }
- // List<PlnSteelforOrdEntity1> listSource = EntityHelper.GetData<PlnSteelforOrdEntity1>(
- //"Core.LgMes.Server.Stuffmanage.FrmStuffSurfaceResult.doQueryPlanStoveNo", new object[] { startTim, endTim, stoveNo, this.ultraOptionSet2.CheckedItem.DataValue.ToString(), arr, "1" }, this.ob);
- stlLgProgrrssEntityBindingSource.Clear();
- List<PlnSteelforOrdEntity> listSource1 = EntityHelper.GetData<PlnSteelforOrdEntity>(
- "Core.LgMes.Server.Stuffmanage.FrmStuffSurfaceResult.doQueryPlan", new object[] { startTim, endTim, stoveNo, this.ultraOptionSet2.CheckedItem.DataValue.ToString(), arr,"1" }, this.ob);
- //EntityHelper.AddEntityRelation(listSource, listSource1, L1, L2);
- PlnSteelforOrdEntityBindingSource.DataSource = listSource1;
- this.entityGrid1.DisplayLayout.Bands[0].Columns["StoveNo"].MergedCellStyle = Infragistics.Win.UltraWinGrid.MergedCellStyle.Always;
- }
- /// <summary>
- /// 合并单元格
- /// </summary>
- /// <param name="ug"></param>
- /// <param name="columnKeys"></param>
- private void MergedCell(UltraGrid ug, string[] columnKeys)
- {
- if (columnKeys.Length == 0)
- {
- return;
- }
- ug.DisplayLayout.Override.MergedCellStyle = MergedCellStyle.Never;
- for (int i = 0; i < columnKeys.Length; i++)
- {
- ug.DisplayLayout.Bands[0].Columns[columnKeys[i]].MergedCellStyle = MergedCellStyle.Always;
- }
- }
-
- /// <summary>
- /// 数据验证
- /// </summary>
- /// <returns></returns>
- private bool CheckQuery()
- {
- if (this.chkStoveNo.Checked && string.IsNullOrEmpty(this.txtStoveNo.Text.Trim()))
- {
- MessageUtil.ShowWarning("请输入熔炼炉号!");
- return false;
- }
- //if(this.chkJugeHeatNo.Checked&& string.IsNullOrEmpty(this.txtJugeNo.Text.Trim()))
- //{
- // MessageUtil.ShowWarning("请输入判定炉号!");
- // return false;
- //}
- return true;
- }
-
-
- /// <summary>
- /// 查询入库实绩
- /// </summary>
- private void doQueryInList()
- {
- string heatNo = "";
- string startTim = "";
- string endTim = "";
- string[] arr = BaseMethod.InitLgPermissions(this.ValidDataPurviewIds,"B", this.ob);
- if (!CheckQuery()) return;
- if (this.chkStoveNo.Checked)
- {
- heatNo = this.txtStoveNo.Text.Trim();
- }
- if (this.chkTim.Checked)
- {
- startTim = this.StartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
- endTim = this.EndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- //if (this.chkJugeHeatNo.Checked)
- //{
- // judgeHeatNo = this.txtJugeNo.Text.Trim();
- //}
- List<YdmGpInlistEntity> listSource = EntityHelper.GetData<YdmGpInlistEntity>(
- "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.doQueryInList", new object[] { startTim, endTim, heatNo, arr }, this.ob);
- YdmGpInlistEntitybindingSource.DataSource = listSource;
- }
-
- /// <summary>
- /// 收料
- /// </summary>
- private void ReceiveData()
- {
- this.entityGrid1.UpdateData();
- string storeNo = "";
- IQueryable<UltraGridRow> checkMagRows = this.entityGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请勾选需要收料的切割实绩信息!");
- return;
- }
- string[] arr = BaseMethod.WarehousePermissions(this.CustomInfo,this.ValidDataPurviewIds,ob);
- if (arr[0].ToString() == "")
- {
- MessageUtil.ShowTips("无仓库权限,无法收料!");
- return;
- }
- storeNo = arr[0].ToString();
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- StlIncisionEntity stlInEntity = (StlIncisionEntity)uRow.ListObject;
- string stlIntity = JSONFormat.Format(stlInEntity);
- parm.Add(stlIntity);
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否收料?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "receiveData";
- ccp.ServerParams = new object[] { parm,this.UserInfo.GetUserName() };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("收料成功!"))
- {
-
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
-
- }
- /// <summary>
- /// 撤销收料
- /// </summary>
- private void CancelReceive()
- {
- this.entityGrid2.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.entityGrid2.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请勾选需要撤销的收料实绩!");
- return;
- }
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatGpMEntity matGpEntity = (MatGpMEntity)uRow.ListObject;
- string matTity = JSONFormat.Format(matGpEntity);
- parm.Add(matTity);
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销收料?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "cancelReceive";
- ccp.ServerParams = new object[] { parm};
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("撤销收料成功!"))
- {
- doQueryPlan();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
-
- }
-
- /// <summary>
- /// 确认入库
- /// </summary>
- private void EnsureInPutData()
- {
-
- this.entityGrid2.UpdateData();
- UltraGridRow uRow1 = this.entityGrid1.ActiveRow;
- if (uRow1 == null)
- {
- return;
- }
- if (uRow1.Cells["CcmState"].Text != "表检完成")
- {
- MessageUtil.ShowTips("表检未完成,不允许交库!");
- return;
- }
- string storeNo = "";
- string departId = ClsLoad.GetDepartIdBySectionId(this.UserInfo.GetDeptid(), this.ob);
- string departMent = ClsLoad.GetDepartBySectionId(this.UserInfo.GetDeptid(), this.ob);
- string[] storeType = new string[4];
- IQueryable<UltraGridRow> checkMagRows = this.entityGrid2.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请勾选可交库信息!");
- return;
- }
- //string[] arr = BaseMethod.WarehousePermissions(this.CustomInfo, this.ValidDataPurviewIds, ob);
- //if (arr[0].ToString() == "")
- //{
- // MessageUtil.ShowTips("无仓库权限,无法入库!");
- // return;
- //}
- //storeNo = arr[0].ToString();
- if (uRow1.Cells["PlineCode"].Text.Equals("C002"))
- {
- storeNo = "XYL1";
- }
- else if (uRow1.Cells["PlineCode"].Text.Equals("C004"))
- {
- storeNo = "XEL1";
- }
- else if (uRow1.Cells["PlineCode"].Text.Equals("C007"))
- {
- storeNo = "XSL1";
- }
- else
- {
- MessageUtil.ShowTips("未获取到所在产线,无法交库!");
- return;
- }
-
- storeType = getStoreType(storeNo);
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- StlLgProgrrssEntity matGpEntity = (StlLgProgrrssEntity)uRow.ListObject;
- string matTity = JSONFormat.Format(matGpEntity);
- parm.Add(matTity);
- }
- PlnSteelforOrdEntity plnSteelForTity = (PlnSteelforOrdEntity)uRow1.ListObject;
- string plnSteelEntity = JSONFormat.Format(plnSteelForTity);
- if (MessageUtil.ShowYesNoAndQuestion("是否入库?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "ensureInPutData";
- ccp.ServerParams = new object[] { parm, storeNo, strInBound, storeType, this.UserInfo.GetUserName(), this.UserInfo.GetDeptid(), this.UserInfo.GetDepartment(), departId, departMent, plnSteelEntity };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("入库成功!"))
- {
- doQueryPlan();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
-
- }
-
- /// <summary>
- /// 撤销入库
- /// </summary>
- private void CancelInPutData()
- {
- this.entityGrid3.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.entityGrid3.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请勾选需要撤销的入库实绩!");
- return;
- }
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- YdmGpInlistEntity ydmGpInListEntity = (YdmGpInlistEntity)uRow.ListObject;
- string inListTity = JSONFormat.Format(ydmGpInListEntity);
- parm.Add(inListTity);
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销入库?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore";
- ccp.MethodName = "cancelInPutData";
- ccp.ServerParams = new object[] { parm };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("撤销入库成功!"))
- {
- doQueryInList();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
-
- }
- /// <summary>
- /// 查询仓库类型
- /// </summary>
- /// <param name="storeNo"></param>
- /// <returns></returns>
- private string[] getStoreType(string storeNo)
- {
- string[] storeType = new string[4];
- DataTable dt = ServerHelper.GetData("Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.getStoreType", new object[] { storeNo }, ob);
- if (dt.Rows.Count > 0)
- {
- storeType[0] = dt.Rows[0]["STORAGE_ATTR"].ToString();
- storeType[1] = dt.Rows[0]["STORAGE_ATTR_NAME"].ToString();
- storeType[2] = dt.Rows[0]["STORAGE_TYPE_NO"].ToString();
- storeType[3] = dt.Rows[0]["STORAGE_TYPE_NAME"].ToString();
- }
- return storeType;
- }
- private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (ultraTabControl1.SelectedTab.Key == "0")
- {
- if (toolMenu == null) return;
- if (toolMenu.Toolbars[0].Tools.Exists("Query"))
- {
- toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("QueryInList"))
- {
- toolMenu.Toolbars[0].Tools["QueryInList"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("WasteCount"))
- {
- toolMenu.Toolbars[0].Tools["WasteCount"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("EnsureInPut"))
- {
- toolMenu.Toolbars[0].Tools["EnsureInPut"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelInPut"))
- {
- toolMenu.Toolbars[0].Tools["CancelInPut"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("DoBeside"))
- {
- toolMenu.Toolbars[0].Tools["DoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelDoBeside"))
- {
- toolMenu.Toolbars[0].Tools["CancelDoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- this.ultraOptionSet2.Visible = true;
- this.chkTim.Text = "计划日期";
- }
- if (ultraTabControl1.SelectedTab.Key == "1")
- {
- if (toolMenu == null) return;
- if (toolMenu.Toolbars[0].Tools.Exists("Query"))
- {
- toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("QueryInList"))
- {
- toolMenu.Toolbars[0].Tools["QueryInList"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("WasteCount"))
- {
- toolMenu.Toolbars[0].Tools["WasteCount"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("EnsureInPut"))
- {
- toolMenu.Toolbars[0].Tools["EnsureInPut"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelInPut"))
- {
- toolMenu.Toolbars[0].Tools["CancelInPut"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("DoBeside"))
- {
- toolMenu.Toolbars[0].Tools["DoBeside"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelDoBeside"))
- {
- toolMenu.Toolbars[0].Tools["CancelDoBeside"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- this.ultraOptionSet2.Visible = false;
- this.chkTim.Text = "入库时间";
- }
- else
- {
- }
- }
- private void FrmStuffInputStore_Shown(object sender, EventArgs e)
- {
- if (toolMenu == null) return;
- if (toolMenu.Toolbars[0].Tools.Exists("Query"))
- {
- toolMenu.Toolbars[0].Tools["Query"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("QueryInList"))
- {
- toolMenu.Toolbars[0].Tools["QueryInList"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("EnsureInPut"))
- {
- toolMenu.Toolbars[0].Tools["EnsureInPut"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("WasteCount"))
- {
- toolMenu.Toolbars[0].Tools["WasteCount"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelInPut"))
- {
- toolMenu.Toolbars[0].Tools["CancelInPut"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("DoBeside"))
- {
- toolMenu.Toolbars[0].Tools["DoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- if (toolMenu.Toolbars[0].Tools.Exists("CancelDoBeside"))
- {
- toolMenu.Toolbars[0].Tools["CancelDoBeside"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- }
- private void chkTim_CheckedChanged(object sender, EventArgs e)
- {
- this.StartTime.Enabled = this.EndTime.Enabled = this.chkTim.Checked;
- }
- private void chkStoveNo_CheckedChanged(object sender, EventArgs e)
- {
- this.txtStoveNo.Enabled = this.chkStoveNo.Checked;
- }
- private void entityGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow uRow = this.entityGrid1.ActiveRow;
- //if (uRow.HasChild())
- //{
- // return;
- //}
- if (uRow == null)
- {
- return;
- }
- ArrayList parmList = new ArrayList();
- parmList.Add(uRow.Cells["Furnaceno"].Text);
- parmList.Add(uRow.Cells["Sequenceno"].Text);
- parmList.Add(uRow.Cells["StoveNo"].Text);
- parmList.Add(uRow.Cells["JudgeStoveNoSeq"].Text);
- List<StlLgProgrrssEntity> listSource = EntityHelper.GetData<StlLgProgrrssEntity>(
- "Core.LgMes.Server.Stuffmanage.FrmStuffInputStore.doQueryStlLgProcess", new object[] { parmList }, this.ob);
- stlLgProgrrssEntityBindingSource.DataSource = listSource;
- foreach(UltraGridRow row in this.entityGrid2.Rows)
- {
- row.Cells["CHK"].Value = "True";
- }
- }
- private void txtStoveNo_KeyDown(object sender, KeyEventArgs e)
- {
- if(e.KeyValue == 13)
- {
- doQueryPlan();
- }
-
- }
- }
- }
|