| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707 |
- using com.steering.mes.mcp.entity;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.CollarMaterial;
- using Core.StlMes.Client.Mcp.Common;
- using Core.StlMes.Client.Mcp.Control;
- using Core.StlMes.Client.Mcp.Entity;
- using CoreFS.CA06;
- using Infragistics.Win;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Mcp.CollarLibrary
- {
- public partial class FrmCollarInBound : FrmBase
- {
- private string strOutbound = "800703";//入库类型编码
- private string strOutname = "";//入库类型名称
- private TalentICTGXControl.TalentICTGXClass icClass;
- public FrmCollarInBound()
- {
- this.IsLoadUserView = true;
- InitializeComponent();
- try
- {
- string[] portnames = System.IO.Ports.SerialPort.GetPortNames(); //获取计算机串口数组
- if (portnames is Infragistics.Win.UltraWinGrid.Nullable || portnames.Length < 1)
- {
- portnames = new string[10] { "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "COM10" };
- }
- txtCom.DataSource = portnames;
- }
- catch (Exception eex3)
- {
- MessageBox.Show(eex3.Message);
- }
- }
- private void FrmCollarInBound_Load(object sender, EventArgs e)
- {
- StorInfo();
- getStoreAll();
- RegStartTime.Value = DateTime.Parse(DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00");
- RegEndTime.Value = DateTime.Parse(DateTime.Today.AddDays(1).AddSeconds(-1).ToString("yyyy-MM-dd") + " 23:59:59");
- EntityHelper.ShowGridCaption<CouplingMatDealEntity>(ultraGrid2.DisplayLayout.Bands[0]);
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.WarehousePermissions.getKepNo", null, this.ob);
- cmbMaterial.DataSource = dt;
- cmbMaterial.DisplayMember = "KEP_NO";
- PipeManageClass.SetComboItemHeight(cmbMaterial);
- PipeManageClass.setUltraGridColumnInput(ultraGrid2, new string[] { "DealNum" });//支数
- PipeManageClass.setUltraGridColumnMaxInput(ultraGrid2, new string[] { "DealWt" });//重量
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- doQuery();
- break;
- case "Add":
- doAdd();
- break;
- case "Delete":
- doDelete();
- break;
- //case "Refresh":
- // doRefresh();
- // break;
- case "Export":
- GridHelper.ulGridToExcel(ultraGrid2, "交易实绩表");
- break;
- case "ReadCard":
- readData();
- break;
- case "Close":
- this.Close();
- break;
- case "clearCard":
- clearCard();
- break;
- }
- }
- void icClass_OnFindCard()
- {
- icClass.OnFindCard -= new TalentICTGXControl.ITalentICTGXEvents_OnFindCardEventHandler(icClass_OnFindCard);
- icClass.OnDropCard += new TalentICTGXControl.ITalentICTGXEvents_OnDropCardEventHandler(icClass_OnDropCard);
- }
- void icClass_OnDropCard()
- {
- //将OnDropCard事件从委托链中删除,并加入OnFindCard事件到委托链中。
- //这样就实现了程序中自动寻卡的功能。
- icClass.OnDropCard -= new TalentICTGXControl.ITalentICTGXEvents_OnDropCardEventHandler(icClass_OnDropCard);
- icClass.OnFindCard += new TalentICTGXControl.ITalentICTGXEvents_OnFindCardEventHandler(icClass_OnFindCard);
- }
- /// <summary>
- /// 读卡
- /// </summary>
- private void readData()
- {
- WaitingForm2 wf = new WaitingForm2("正在加载,请稍候....");
- try
- {
- string outdoc = "";
- if (!ConnectCard(wf))
- {
- disConnect();
- wf.Close();
- return;
- }
- icClass.PrepareReadTemp();
- //bool b = icClass.DoReadTemp(1, 39);
- if (icClass.DoReadTemp(1, 39))
- {
- int count = icClass.RecordCount;
- if (count == 0) //判断卡上的记录数
- {
- wf.Close();
- MessageUtil.ShowTips("IC卡无记录,请核实!");
- disConnect();
- return;
- }
- else
- {
- outdoc = icClass.taskid.ToString2();
- }
- //disConnect();
- }
- else
- {
- wf.Close();
- MessageUtil.ShowTips("读取IC卡出现错误!");
- disConnect();
- return;
- }
- doQueryOutList(outdoc);
- }
- catch (Exception e)
- {
- MessageUtil.ShowTips(e.Message);
- }
- finally
- {
- disConnect();
- wf.Close();
- }
- }
- ///<summary>
- /// 关闭连接
- /// </summary>
- /// <returns></returns>
- private bool disConnect()
- {
- try
- {
- if (icClass.Active)
- {
- icClass.AlarmBeep(1);
- //设置Active属性为false,则断开与读卡器的连接。
- icClass.ToFindCard = false;
- icClass.Active = false;
- return true;
- }
- else
- {
- return true;
- }
- }
- catch (Exception e)
- {
- return true;
- }
- }
- /// <summary>
- /// 连接读卡器
- /// </summary>
- /// <returns></returns>
- private bool ConnectCard(WaitingForm2 wf)
- {
- try
- {
- //if (icClass == null)
- //{
- // icClass = new TalentICTGXControl.TalentICTGXClass();
- // //委托OnFindCard事件,icClass_OnFindCard是该事件要执行的方法。
- // //此事件在当IC卡放到读卡器上时触发。
- // icClass.OnFindCard += new TalentICTGXControl.ITalentICTGXEvents_OnFindCardEventHandler(icClass_OnFindCard);
- //}
- icClass = IcReadWrite.getIcClass();
- int comNum = (short)(short.Parse(txtCom.Text.Replace("COM", "")) - 1);
- icClass.CommPort = comNum;
- if (!icClass.Active)
- {
- //利用ToFindCard属性连接读卡器,启动OnFindCard事件。
- icClass.ToFindCard = true;
- if (icClass.Active)
- {
- //AlarmBeep(int times)方法实现了让IC卡读卡器发出警示音,
- //参数为发出几次警示音。
- icClass.AlarmBeep(2);
- Thread.Sleep(500);
- return true;
- }
- else
- {
- wf.Close();
- MessageUtil.ShowTips("读卡器连接失败!或请切换端口尝试!");
- return false;
- }
- }
- }
- catch (Exception e)
- {
- wf.Close();
- MessageUtil.ShowTips("读卡器连接失败!或请切换端口尝试!");
- return false;
- }
- finally
- {
- wf.Close();
- }
- return true;
- }
- /// <summary>
- /// 清卡
- /// </summary>
- private void clearCard()
- {
- string dealOrde = "";
- WaitingForm2 wf = new WaitingForm2("正在加载,请稍候....");
- try
- {
- if (ConnectCard(wf) == false)
- {
- return;
- }
- else
- {
- icClass.PrepareReadTemp();
- if (icClass.DoReadTemp(1, 39))
- {
- dealOrde = icClass.taskid.ToString2();
- if (dealOrde != "")
- {
- //DataTable ds = ServerHelper.GetData("com.steering.ydm.bc.FrmFilpOutStorage.doQueryCount", new object[] { outDoc }, ob);
- DataTable ds = ServerHelper.GetData("com.steering.mes.mcp.CollarLibrary.FrmCollarInBound.doQueryCount", new object[] { dealOrde }, ob);
- if (int.Parse(ds.Rows[0][0].ToString2()) > 0)
- {
- MessageUtil.ShowTips("此卡有未接收倒运记录,不允许清卡!");
- return;
- }
- }
- }
- else
- {
- wf.Close();
- MessageUtil.ShowTips("读取IC卡出现错误,请联系相关部门!");
- }
- }
- icClass.ClearCard();
- icClass.AlarmBeep(1);
- }
- catch
- {
- }
- finally
- {
- disConnect();
- wf.Close();
- }
- }
- public void doQueryOutList(string dealOrde)
- {
- List<CouplingMatDealEntity> listSource = EntityHelper.GetData<CouplingMatDealEntity>
- ("com.steering.mes.mcp.CollarLibrary.FrmCollarInBound.queryOutPerfo", new object[] { dealOrde }, this.ob);
- couplingMatDealEntityBindingSource.DataSource = listSource;
- }
- private void doQuery()
- {
- string strRegStart = "";
- string strRegEnd = "";
- string strWare = "";//仓库号
- string strMat = "";//框号
- string strFurnace = "";
- if (!CheckQuery()) return;
- ArrayList pram = new ArrayList();
- if (chkWarehous.Checked)
- {
- strWare = cmbWarehous.Value.ToString();
- }
- if (chkMaterial.Checked)
- {
-
- strMat = cmbMaterial.Value.ToString();
- }
- if (chkRegTime.Checked)
- {
- strRegStart = RegStartTime.Value.ToString();
- strRegEnd = RegEndTime.Value.ToString();
- }
- if (chkFurnace.Checked)
- {
- strFurnace = txtFurnace.Text.Trim();
- }
- pram.Clear();
- pram.Add(strWare);
- pram.Add(strMat);
- pram.Add(strFurnace);
- pram.Add(strRegStart);
- pram.Add(strRegStart);
- pram.Add(strRegStart);
- pram.Add(strRegEnd);
- pram.Add(strRegEnd);
- string[] str = this.ValidDataPurviewIds;
- //获取用户对应科室ID
- string User = this.UserInfo.GetDeptid();
- string StorageType = "";//根据传递的参数获取仓库类别
- string StorageAttr = "";////根据传递的参数获取仓库类型
- if (CustomInfo != "")
- {
- string[] strflg = CustomInfo.ToString().Split(new char[] { ',' });
- StorageType = strflg[0];
- StorageAttr = strflg[1];
- }
- string[] arr = null;
- DataTable ds = ServerHelper.GetData("com.steering.mes.mcp.common.WarehousePermissions.getStoreNo", new object[] { StorageType, StorageAttr, str }, this.ob);
- if (ds.Rows.Count > 0)
- {
- arr = new string[ds.Rows.Count];
- for (int i = 0; i < ds.Rows.Count; i++)
- {
- arr[i] = ds.Rows[i][0].ToString();
- }
- }
- if (arr == null)
- {
- MessageUtil.ShowTips("无仓库权限!");
- return;
- }
- if (arr.Length < 1)
- {
- return;
- }
- if (ChkOut.Checked)
- {
- List<CouplingMatDealEntity> listSource = EntityHelper.GetData<CouplingMatDealEntity>
- ("com.steering.mes.mcp.CollarLibrary.FrmCollarInBound.queryOutPerfo", new object[] { pram, arr }, this.ob);
- couplingMatDealEntityBindingSource.DataSource = listSource;
- //GridHelper.RefreshAndAutoSize(ultraGrid2);
- }
- else
- {
- List<CouplingMatDealEntity> listSource = EntityHelper.GetData<CouplingMatDealEntity>
- ("com.steering.mes.mcp.CollarLibrary.FrmCollarInBound.queryInPerfo", new object[] { pram, arr }, this.ob);
- couplingMatDealEntityBindingSource.DataSource = listSource;
- //GridHelper.RefreshAndAutoSize(ultraGrid2);
-
- }
- }
- /// <summary>
- /// 获取仓库
- /// </summary>
- private void StorInfo()
- {
- string[] str = this.ValidDataPurviewIds;
- ArrayList arList = new ArrayList();
- //获取用户对应科室ID
- string User = this.UserInfo.GetDeptid();
- string StorageType = "";//根据传递的参数获取仓库类别
- string StorageAttr = "";////根据传递的参数获取仓库类型
- if (CustomInfo != "")
- {
- string[] strflg = CustomInfo.ToString().Split(new char[] { ',' });
- StorageType = strflg[0];
- StorageAttr = strflg[1];
- }
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.WarehousePermissions.getStoreNo", new object[] { StorageType, StorageAttr, str }, this.ob);
- mbStorage.DataSource = dt;
- mbStorage.DisplayMember = "STORAGE_NAME";
- mbStorage.ValueMember = "STORAGE_NO";
- PipeManageClass.SetComboItemHeight(mbStorage);
- cmbWarehous.DataSource = dt;
- cmbWarehous.DisplayMember = "STORAGE_NAME";
- cmbWarehous.ValueMember = "STORAGE_NO";
- PipeManageClass.SetComboItemHeight(cmbWarehous);
- }
- /// <summary>
- /// 获取所有的目标库
- /// </summary>
- private void getStoreAll()
- {
- string StorageType = "";//根据传递的参数获取仓库类别
- string StorageAttr = "";////根据传递的参数获取仓库类型
- //if (CustomInfo != "")
- //{
- // string[] strflg = CustomInfo.ToString().Split(new char[] { ',' });
- // StorageType = strflg[0];
- // StorageAttr = strflg[1];
- //}
- string[] arr = McpBaseHelper.WarehousePermissions(this.CustomInfo, this.ValidDataPurviewIds, this.ob);
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.WarehousePermissions.getStoreAll", new object[] { "800206", arr }, this.ob);
- //cmbWarehous.DataSource = dt;
- //cmbWarehous.DisplayMember = "STORAGE_NAME";
- //cmbWarehous.ValueMember = "STORAGE_NO";
- //PipeManageClass.SetComboItemHeight(cmbWarehous);
- CKstorage.DataSource = dt;
- CKstorage.DisplayMember = "STORAGE_NAME";
- CKstorage.ValueMember = "STORAGE_NO";
- PipeManageClass.SetComboItemHeight(CKstorage);
- }
- ///查询时验证必填项
- private bool CheckQuery()
- {
- if (DataTimeUtil.JudgeTime(DateTime.Parse(RegStartTime.Value.ToString()), DateTime.Parse(RegEndTime.Value.ToString())) == 0)
- {
- MessageUtil.ShowTips("开始时间不能大于结束时间!");
- return false;
- }
- if (chkWarehous.Checked && string.IsNullOrEmpty(cmbWarehous.Text.Trim()))
- {
- MessageBox.Show("请选择仓库号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- //if (chkMaterial.Checked && string.IsNullOrEmpty(cmbMaterial.Text.Trim()))
- //{
- // MessageBox.Show("请选择料位号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- // return false;
- //}
- if (chkFurnace.Checked && string.IsNullOrEmpty(txtFurnace.Text.Trim()))
- {
- MessageBox.Show("请输入炉号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- return true;
- }
- /// <summary>
- /// 验证Checked是否勾选,显示控件可编辑 打勾表示可编辑,不打勾表示不可编辑
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void chk_CheckedChanged(object sender, EventArgs e)
- {
- if (chkWarehous.Checked) { cmbWarehous.Enabled = true; } else { cmbWarehous.Enabled = false; }
- if (chkMaterial.Checked) { cmbMaterial.Enabled = true; } else { cmbMaterial.Enabled = false; }
- if (chkFurnace.Checked) { txtFurnace.Enabled = true; } else { txtFurnace.Enabled = false; }
- if (chkRegTime.Checked) { RegStartTime.Enabled = true; RegEndTime.Enabled = true; } else { RegStartTime.Enabled = false; RegEndTime.Enabled = false; }
- }
- private void FrmCollarInBound_Shown(object sender, EventArgs e)
- {
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- /// <summary>
- /// 回车键查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void txtFurnace_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyValue == 13)
- {
- doQuery();
- }
- }
- /// <summary>
- /// 新增
- /// </summary>
- private void doAdd()
- {
- this.ultraGrid2.UpdateData();
- ArrayList list = new ArrayList();
- //查询入库类型
- DataTable dt = PipeManageClass.getComTypeInfo(strOutbound, ob);
- if (dt.Rows.Count >= 1)
- {
- strOutname = dt.Rows[0]["BASENAME"].ToString();
- }
- else
- {
- MessageUtil.ShowTips("入库类型不能为空,请确认基础信息是否有对应出库类型信息!");
- return;
- }
- int num = 0;
-
- ArrayList List = new ArrayList();
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGrid2.Rows)
- {
- if (Convert.ToBoolean(uRow.Cells["CHOOSE"].Text) == true)
- {
- num++;
- ArrayList pram = new ArrayList();
- pram.Add(uRow.Cells["resultNo"].Text.ToString());
- pram.Add(uRow.Cells["zyPlanId"].Text.ToString());
- pram.Add(uRow.Cells["matNo"].Text.ToString());
- pram.Add(uRow.Cells["tarKepNo"].Text.ToString());
- pram.Add(uRow.Cells["tarStorageNo"].Value.ToString());
- pram.Add(uRow.Cells["DealOrde"].Text.ToString());
- pram.Add(this.UserInfo.GetUserName());
- pram.Add(strOutbound);
- pram.Add(strOutname);
- pram.Add(uRow.Cells["WoId"].Text.ToString());
- List.Add(pram);
- }
- }
- if (num == 0)
- {
- MessageUtil.ShowTips("请选择需要操作的数据!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认收料?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.CollarLibrary.FrmCollarInBound";
- ccp.MethodName = "addOutLibResult";
- ccp.ServerParams = new object[] { List };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("收料成功!"))
- {
- clearCard();
- doQuery();
- }
- }
- /// <summary>
- /// 作废
- /// </summary>
- private void doDelete()
- {
- UltraGridRow ugr = this.ultraGrid2.ActiveRow;
- int count = 0;
- if (ugr == null) return;
- ArrayList list = new ArrayList();
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGrid2.Rows)
- {
- if (Convert.ToBoolean(uRow.Cells["CHOOSE"].Text) == true)
- {
- count += 1;
- ArrayList pram = new ArrayList();
- pram.Add(uRow.Cells["resultNo"].Text.Trim());
- pram.Add(uRow.Cells["zyPlanId"].Text.Trim());
- pram.Add(uRow.Cells["matNo"].Text.Trim());
- pram.Add(uRow.Cells["tarKepNo"].Value.ToString());
- pram.Add(uRow.Cells["tarStorageNo"].Value.ToString());
- pram.Add(this.UserInfo.GetUserName());
- pram.Add(uRow.Cells["dealOrde"].Text.ToString());
- list.Add(pram);
- }
- }
- if (count == 0) { MessageUtil.ShowTips("请选择要撤销的数据"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认撤销?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.CollarLibrary.FrmCollarInBound";
- ccp.MethodName = "deleteOutLibResult";
- ccp.ServerParams = new object[] { list };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销收料成功!"))
- {
- doQuery();
- }
- }
- private void ultraGrid2_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- foreach (UltraGridRow uRow in ultraGrid2.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHOOSE"].Value = true;
- }
- }
- }
- private void ChkOut_CheckedChanged(object sender, EventArgs e)
- {
- if (ChkOut.Checked)
- {
- ChkIn.Checked = false;
- ultraTabControl1.Tabs[0].Text = "倒库实绩";
- //this.ultraGrid2.DisplayLayout.Bands[0].Columns["TarRecFlag"].Hidden = false;
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
- toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.True;
- toolMenu.Toolbars[0].Tools["ReadCard"].InstanceProps.Visible = DefaultableBoolean.True;
- }
- else
- {
- ultraTabControl1.Tabs[0].Text = "收料实绩";
- //this.ultraGrid2.DisplayLayout.Bands[0].Columns["TarRecFlag"].Hidden = true;
- toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False;
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.True;
- toolMenu.Toolbars[0].Tools["ReadCard"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- }
- private void ChkIn_CheckedChanged(object sender, EventArgs e)
- {
- if (ChkIn.Checked)
- {
- ChkOut.Checked = false;
- }
- }
-
- }
- }
|