| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661 |
- 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 Core.Mes.Client.Comm.Control;
- using System.Collections;
- using Core.Mes.Client.Comm.Server;
- using Core.StlMes.Client.YdmPipeManage.Controls;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using Core.StlMes.Client.YdmPipeManage.Tool;
- namespace Core.StlMes.Client.YdmPipeManage
- {
- public partial class frmPipeMoveIn : FrmBase
- {
-
- private string strOutbound = "800703";//入库类型编码
- private string strOutname = "";//入库类型名称
- private string strInMemo = "";//入库简码
- private int isSelect = 0;//新增
- private int isDelete = 0;//废除
- public frmPipeMoveIn()
- {
- InitializeComponent();
- }
-
- private void frmPipeMoveIn_Load(object sender, EventArgs e)
- {
- this.txtOutList.Enabled = false;
- RegStartTime.Value = DateTime.Parse(DateTime.Today.ToString("yyyy-MM-dd") + " 00:00:00");
- //DateTime.Today;// ;
- RegEndTime.Value = DateTime.Parse(DateTime.Today.AddDays(1).AddSeconds(-1).ToString("yyyy-MM-dd") + " 23:59:59");// DateTime.Parse(DateTime.Now.ToString("yyyy年MM月dd日") + " 23:59:59");
- ProEndTime.DateTime = DateTime.Parse(DateTime.Now.ToString("yyyy年MM月dd日") + " 23:59:59");
- //ClsBaseInfo.SetComboItemHeight(cmbProvin);//车号
- if (CustomInfo != "A")
- {
- BaseMethod.InitStorage(cmbWareEdi, CustomInfo, this.ValidDataPurviewIds, this.ob);
- BaseMethod.InitStorage(cmbWarehous, CustomInfo, this.ValidDataPurviewIds, this.ob);
- }else
- {
- BaseMethod.InitStorage(cmbWareEdi,this.ValidDataPurviewIds, this.ob);
- BaseMethod.InitStorage(cmbWarehous,this.ValidDataPurviewIds, this.ob);
- }
-
-
- }
- /// <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":
- if (ultraTabControl1.SelectedTab.Key.Equals("Out"))
- {
- GridHelper.ulGridToExcel(ultraGrid1, "倒库实绩表");
- }
- else
- {
- GridHelper.ulGridToExcel(ultraGrid2, "收料入库实绩表");
- }
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 绑定原料位号下拉框
- /// </summary>
- private void Init()
- {
- //绑定料位号
- string strStorage = "";
- if (cmbWarehous.SelectedIndex != -1)
- {
- strStorage = cmbWarehous.Value.ToString();
- }
- ArrayList pram = new ArrayList();
- pram.Add(strStorage);
- PipeManageClass.BindLocationInfo(pram, cmbMaterial, ob);
- }
- /// <summary>
- /// 绑定目标料位号下拉框
- /// </summary>
- private void InitM()
- {
- //绑定料位号
- string strStorage = "";
- if (cmbWareEdi.Value == null)
- {
- return;
- }
- else
- {
- strStorage = cmbWareEdi.Value.ToString();
- }
- ArrayList pram = new ArrayList();
- pram.Add(strStorage);
- PipeManageClass.BindLocationInfo(pram, cmbMaterialEdi, ob);
- }
- /// <summary>
- /// 查询
- /// </summary>
- private void doQuery()
- {
- if (!CheckQuery()) return;
- string strRegStart = "1999-01-01 00:00:00";
- string strRegEnd = "2100-01-01 00:00:00";
- string strProStart = "";
- string strProEnd = "";
- string strWare = "";//仓库号
- string strMat = "";//料位号
- string strFurnace = "";
- string strBatch = "";
- string moveInDoc = "";
- string userId = UserInfo.GetDeptid();//科室
- string userMent = BaseMethod.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);//部门
- 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 (chkProTime.Checked)
- {
- strProStart = ProStartTime.Value.ToString();
- strProEnd = ProEndTime.Value.ToString();
- }
- if (chkFurnace.Checked)
- {
- strFurnace = txtFurnace.Text.Trim();
- }
- if (chkBatch.Checked)
- {
- strBatch = txtBatch.Text.Trim();
- }
- if (chkDk.Checked)
- {
- moveInDoc = txtOutList.Text.Trim();
- }
- ArrayList pram = new ArrayList();
- pram.Add(strWare);
- pram.Add(strMat);
- pram.Add(strFurnace);
- pram.Add(strRegStart);
- pram.Add(strRegEnd);
- pram.Add(moveInDoc);
- string[] storges = null;
- if (CustomInfo != "A")
- {
- storges = BaseMethod.WarehousePermissions(CustomInfo, this.ValidDataPurviewIds, this.ob);
- if (storges == null) return;
- if (ultraTabControl1.SelectedTab.Key.Equals("Out"))
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryOutPerfo", new object[] { pram, storges }, ob);
- GridHelper.CopyDataToDatatable(dt, this.dataMove, true);
- UltraGridBand ugb = this.ultraGrid1.DisplayLayout.Bands[0];
- UltraGridColumn[] col = new UltraGridColumn[] { ugb.Columns["STD_NAME"], ugb.Columns["MODEL_DESC"], ugb.Columns["PLINE_NAME"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, col);
- this.ultraGrid1.DisplayLayout.Override.CellAppearance.TextTrimming = TextTrimming.EllipsisCharacter;
- }
- else
- {
- DataTable dtIn = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryInListInfo", new object[] { pram, storges, strOutbound }, ob);
- GridHelper.CopyDataToDatatable(dtIn, this.dataIn, true);
- UltraGridBand ugb = this.ultraGrid2.DisplayLayout.Bands[0];
- UltraGridColumn[] col = new UltraGridColumn[] { ugb.Columns["STD_NAME"], ugb.Columns["MODEL_DESC"], ugb.Columns["PLINE_NAME"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid2, col);
- this.ultraGrid2.DisplayLayout.Override.CellAppearance.TextTrimming = TextTrimming.EllipsisCharacter;
- }
- }
- else
- {
- storges = BaseMethod.WarehousePermissionsStore(this.ValidDataPurviewIds, ob);
- if (storges == null) return;
- if (ultraTabControl1.SelectedTab.Key.Equals("Out"))
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryOutPerfo1", new object[] { pram, storges,"0" }, ob);
- GridHelper.CopyDataToDatatable(dt, this.dataMove, true);
- UltraGridBand ugb = this.ultraGrid1.DisplayLayout.Bands[0];
- UltraGridColumn[] col = new UltraGridColumn[] { ugb.Columns["STD_NAME"], ugb.Columns["MODEL_DESC"], ugb.Columns["PLINE_NAME"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, col);
- this.ultraGrid1.DisplayLayout.Override.CellAppearance.TextTrimming = TextTrimming.EllipsisCharacter;
- }
- else
- {
- DataTable dtIn = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryInListInfo1", new object[] { pram, storges, strOutbound,"0" }, ob);
- GridHelper.CopyDataToDatatable(dtIn, this.dataIn, true);
- UltraGridBand ugb = this.ultraGrid2.DisplayLayout.Bands[0];
- UltraGridColumn[] col = new UltraGridColumn[] { ugb.Columns["STD_NAME"], ugb.Columns["MODEL_DESC"], ugb.Columns["PLINE_NAME"] };
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid2, col);
- this.ultraGrid2.DisplayLayout.Override.CellAppearance.TextTrimming = TextTrimming.EllipsisCharacter;
- }
- }
- }
- /// <summary>
- /// 新增倒库入库
- /// </summary>
- private void doAdd()
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null) return;
- //if(cmbWareEdi.SelectedIndex==-1)
- //{
- // MessageUtil.ShowTips("目标仓库号不能为空,请选择!");
- // return;
- //}
-
- DataTable dt = PipeManageClass.getComTypeInfo(strOutbound, ob);
- if (dt.Rows.Count <= 0)
- {
- MessageUtil.ShowTips("入库类型不能为空,请确认基础信息是否有对应的入库类型信息!");
- return;
- }
- else
- {
- strOutname = dt.Rows[0]["BASENAME"].ToString();
- strInMemo = dt.Rows[0]["MEMO"].ToString();
- }
- int n = 0;
-
- // string strCar = cmbProvin.Text.ToString() + txtCar.Text.Trim();
- ArrayList list = new ArrayList();
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(uRow.Cells["CHOOSE"].Text) == true)
- {
- n += 1;
- ArrayList addList = new ArrayList();
- addList.Add(uRow.Cells["ACT_COUNT"].Text.Trim());
- addList.Add(uRow.Cells["JUDGE_STOVE_NO"].Text.Trim());
- addList.Add(uRow.Cells["BATCH_NO"].Text.Trim());
- addList.Add(uRow.Cells["BATCH_GROUD_NO"].Text.Trim());
- addList.Add(uRow.Cells["OUTSTOCK_DOC"].Text.Trim());
- addList.Add(this.UserInfo.GetUserOrder());//班次
- addList.Add(this.UserInfo.GetUserGroup());//班组
- addList.Add(this.UserInfo.GetUserName());
- addList.Add(strOutbound);
- addList.Add(strOutname);
- addList.Add(cmbWareEdi.Value.ToString());
- addList.Add(cmbMaterialEdi.Text.ToString());
- addList.Add(uRow.Cells["VEHICLE_NO"].Text.Trim());
- list.Add(addList);
-
- }
- }
- if (n ==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.pss.ydm.pipemanage.FrmPipeMoveIn";
- ccp.MethodName = "addInList";
- ccp.ServerParams = new object[] { list, strInMemo };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception e)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("收料入库成功!"))
- {
- 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;
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryOutCount", new object[] { uRow.Cells["JUDGE_STOVE_NO"].Text.Trim(), uRow.Cells["BATCH_NO"].Text.Trim(), uRow.Cells["BATCH_GROUD_NO"].Text.Trim() }, ob);
- if (dt.Rows.Count <= 0)
- {
- MessageUtil.ShowTips("该炉已不在库,不能作废!");
- return;
- }
- else
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- if (dt.Rows[0]["MAT_STATUS"].ToString().Equals("80150302"))
- {
- MessageUtil.ShowTips("该炉已编提单,不能作废!");
- return;
- }
- }
- //if (dt.Rows[0]["act_count"].ToString() == "")
- //{
- // MessageUtil.ShowTips("该入库单号支数与出库支数不匹配,不能作废!");
- // return;
- }
- ArrayList pram = new ArrayList();
- pram.Add(uRow.Cells["INSTOCK_DOC"].Text.Trim());
- pram.Add(uRow.Cells["JUDGE_STOVE_NO"].Text.Trim());
- pram.Add(uRow.Cells["BATCH_NO"].Text.Trim());
- pram.Add(uRow.Cells["BATCH_GROUD_NO"].Text.Trim());
- pram.Add(uRow.Cells["act_count"].Text.Trim());
- pram.Add(this.UserInfo.GetUserName());
- 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.pss.ydm.pipemanage.FrmPipeMoveIn";
- ccp.MethodName = "upDateInfo";
- ccp.ServerParams = new object[] { list, strOutbound };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception e)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销收料成功!"))
- {
- doQuery();
- }
- }
- }
- /// <summary>
- /// 刷新
- /// </summary>
- private void doRefresh()
- {
- cmbWarehous.SelectedIndex = -1;
- //cmbWareEdi.SelectedIndex = -1;
- //BaseMethod.InitStorage(cmbWareEdi, CustomInfo, this.ValidDataPurviewIds, this.ob);
- BaseMethod.InitStorage(cmbWarehous, CustomInfo, this.ValidDataPurviewIds, this.ob);
- //Init();
- //InitM();
- }
- ///查询时验证必填项
- private bool CheckQuery()
- {
- if (DataTimeUtil.JudgeTime(DateTime.Parse(RegStartTime.Value.ToString()), DateTime.Parse(RegEndTime.Value.ToString())) == 0)
- {
- MessageUtil.ShowTips("开始时间不能大于结束时间!");
- return false;
- }
- if (DataTimeUtil.JudgeTime(DateTime.Parse(ProStartTime.Value.ToString()), DateTime.Parse(ProEndTime.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;
- }
- if (chkBatch.Checked && string.IsNullOrEmpty(txtBatch.Text.Trim()))
- {
- MessageBox.Show("请输入批号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (chkDk.Checked && string.IsNullOrEmpty(txtOutList.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 (chkBatch.Checked) { txtBatch.Enabled = true; } else { txtBatch.Enabled = false; }
- if (chkRegTime.Checked) { RegStartTime.Enabled = true; RegEndTime.Enabled = true; } else { RegStartTime.Enabled = false; RegEndTime.Enabled = false; }
- if (chkProTime.Checked) { ProStartTime.Enabled = true; ProEndTime.Enabled = true; } else { ProStartTime.Enabled = false; ProEndTime.Enabled = false; }
- }
- /// <summary>
- /// 根据原仓库号改变绑定原料位号
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void cmbWarehous_TextChanged(object sender, EventArgs e)
- {
- Init();
- }
- /// <summary>
- /// 根据目标仓库号改变绑定目标料位号
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void cmbWareEdi_TextChanged(object sender, EventArgs e)
- {
- InitM();
- }
- private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (toolMenu == null) return;
- if (ultraTabControl1.SelectedTab.Key.Equals("Out"))
- {
- this.chkRegTime.Text = "倒库时间";
- chkDk.Text = "倒库单号";
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
- toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.True;
- //chkMaterial.Visible = false;
- //cmbMaterial.Visible = false;
- //chkWarehous.Visible = false;
- //cmbWarehous.Visible = false;
- //chkDk.Visible = true;
- //txtOutList.Visible = true;
- }
- else
- {
- this.chkRegTime.Text = "收料时间";
- chkDk.Text = "入库单号";
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.True;
- toolMenu.Toolbars[0].Tools["Add"].InstanceProps.Visible = DefaultableBoolean.False;
- //chkMaterial.Visible = true;
- //cmbMaterial.Visible = true;
- //chkWarehous.Visible = true;
- //cmbWarehous.Visible = true;
- //chkDk.Visible = false;
- //txtOutList.Visible = false;
- }
- }
- private void txtOutList_KeyUp(object sender, KeyEventArgs e)
- {
- ArrayList list = new ArrayList();
- switch (e.KeyCode)
- {
- case Keys.Enter:
- if (txtOutList.Text.Trim() != "")
- {
- if (!PipeManageClass.IsOnlyLetterAndDigit(txtOutList.Text))
- { return; }
- string[] strflg = txtOutList.Text.Trim().ToString().Split(new char[] { '/' });
- for (int i = 0; i < strflg.Length; i++)
- {
- list.Add(strflg[i]);
- }
- }
- else
- {
- list.Add("");
- }
- DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmPipeMoveIn.queryOutListSend", new object[] { list }, ob);
- GridHelper.CopyDataToDatatable(dt, this.dataMove, true);
- GridHelper.RefreshAndAutoSize(ultraGrid1);
- break;
-
- }
- }
- private void ultraGrid1_CellChange(object sender, CellEventArgs e)
- {
- ultraGrid1.UpdateData();
- if (e.Cell.Column.Key.Equals("CHOOSE"))
- {
- txtOutList.Text = "";
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow uRow in ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(uRow.Cells["CHOOSE"].Value))
- {
- // txtOutList.Text += uRow.Cells["OUTSTOCK_DOC"].Text.Trim() + "/";
- }
- }
- //if (txtOutList.Text.Trim() == "") return;
- //txtOutList.Text = txtOutList.Text.Substring(0, txtOutList.Text.Length - 1);
- if (Convert.ToBoolean(e.Cell.Value))
- {
- isSelect += 1;
- }
- else
- isSelect -= 1;
- }
- }
- private void txtOutList_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!PipeManageClass.IsOnlyLetterAndDigit(txtOutList.Text)&&e.KeyChar!=(char)13&&e.KeyChar!=(char)8)
- {
- e.Handled = true;
- MessageUtil.ShowTips("只能输入数字、字母和/!");
- txtOutList.Focus();//让文本框获取焦点
- txtOutList.Select(txtOutList.TextLength, 0);//设置光标的位置到文本尾
- txtOutList.ScrollToCaret();//滚动到控件光标处
- }
- else { e.Handled = false; }
- }
- private void ultraGrid2_CellChange(object sender, CellEventArgs e)
- {
- if (e.Cell.Column.Key.Equals("CHOOSE"))
- {
- if (Convert.ToBoolean(e.Cell.Text) == true)
- {
- isDelete += 1;
- }
- else
- isDelete -= 1;
- }
- }
- private void frmPipeMoveIn_Shown(object sender, EventArgs e)
- {
- toolMenu.Toolbars[0].Tools["Delete"].InstanceProps.Visible = DefaultableBoolean.False;
- }
- private void txtFurnace_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyValue == 13)
- {
- doQuery();
- }
- }
- private void chkDk_CheckedChanged(object sender, EventArgs e)
- {
- txtOutList.Enabled = chkDk.Checked;
- }
- private void ultraGrid1_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
- {
- foreach (UltraGridRow uRow in ultraGrid1.Selected.Rows)
- {
- if (uRow.GetType() != typeof(Infragistics.Win.UltraWinGrid.UltraGridGroupByRow))
- {
- uRow.Cells["CHOOSE"].Value = true;
- }
- }
- }
- 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;
- }
- }
- }
- }
- }
|