| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667 |
- 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 com.hnshituo.pur.vo;
- using Infragistics.Win.UltraWinEditors;
- using CoreFS.CA06;using Pur.Entity;
- using Core.Mes.Client.Comm.Control;
- using Pur.require_plan;
- using System.Text.RegularExpressions;
- using Pur.Entity;
- using Pur.PublicTools;
- namespace Pur.Balance
- {
- public partial class FrmPurBasePrice : FrmPmsBase
- {
- public FrmPurBasePrice()
- {
- InitializeComponent();
- }
- private void FrmPurBasePrice_Load(object sender, EventArgs e)
- {
- clearEdtArea();
- QureyBasePriceM();
- DataTable dt = PublicServer.GetData("com.hnshituo.pur.balance.service.impl.FrmBalanceBillManage.QueryAtrr",
- null, ob);
- if (dt == null || dt.Rows.Count == 0)
- {
- dataTable2.Rows.Clear();
- return;
- }
- //DataRow dr = dt.NewRow();
- //dr[0] = "";
- //dt.Rows.InsertAt(dr, 0);
- edtGradeLevel.DataSource = dt;
- edtGradeLevel.DisplayMember = "ATTR_NAME";
- edtGradeLevel.ValueMember = "ATTR_CODE";
- }
- #region toolbar工具栏
- //toolbar工具栏加载
- public override void ToolBar_Click(object sender, string ToolBarKey)
- {
- switch (ToolBarKey)
- {
- case "Query"://查询基价标准主表数据
- QureyBasePriceM();
- //GetQueryPhysicWH();
- break;
- case "Add"://增加基价标准主表
- AddBasePriceM();
- break;
- case "Update"://修改基价标准主表
- EditBasePriceM();
- break;
- case "Delete"://删除基价标准主表
- DeleteBasePriceM();
- break;
- case "AddBasePriceC": //新增基价标准明细表
- AddBasePriceC();
- break;
- case "UpdateBasePriceC"://修改基价标准明细表
- EditBasePriceC();
- break;
- case "DeleteBasePriceC"://删除基价标准明细表
- DeleteBasePriceC();
- break;
- case "Close"://关闭窗口
- this.Close();
- break;
- }
- }
- #endregion
- #region 数据库操作
- /// <summary>
- /// 删除一条明细
- /// </summary>
- private void DeleteBasePriceC()
- {
- try
- {
- //判断是否获取到焦点
- if (ultraGrid2.ActiveRow != null)
- {
- string oldstrid = ultraGrid2.ActiveRow.Cells["id"].Value.ToString().Trim();
- string oldstrstandid = ultraGrid2.ActiveRow.Cells["standId"].Value.ToString().Trim();
- //提示是否需要修改
- if (MessageBox.Show("将修改明细表ID为[" + oldstrid + "]的信息?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
- {
- //构建实体类
- BalanceBasepriceC pc = new BalanceBasepriceC();
- pc.Validflag = "1";
- pc.Id = oldstrid;
- pc.DeleteName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pc.DeleteTime = DateTime.Now;
- pc.DeleteUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceCService", "doDeteleBasePriceC", new object[] { pc });
- if (re.Resultcode == 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("删除成功", "提示");
- QureyBasePriceM();
- BalanceClassCommon.doActiveSelRow(ultraGrid1, "id", oldstrstandid);
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- }
- else
- {
- MessageBox.Show("操作失败:请选择需修改的基价标准行", "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- private void EditBasePriceC()
- {
- try
- {
- //判断是否获取到焦点
- if (ultraGrid2.ActiveRow != null)
- {
- string oldstrid = ultraGrid2.ActiveRow.Cells["id"].Value.ToString().Trim();
- string oldstrstandid = ultraGrid2.ActiveRow.Cells["standId"].Value.ToString().Trim();
- //获取编辑框信息
- string strid = edtIdC.Text.ToString().Trim();
- string strgradelevel = edtGradeLevel.Text== null ? "" : edtGradeLevel.Text.ToString().Trim();
- string strgradevalue = edtGradeLevel.Value == null ? "" : edtGradeLevel.Value.ToString().Trim();
- string strpriceval = edtPriceValue.Text.ToString().Trim();
- string strremark = edtRemarkC.Text.ToString().Trim();
- string oldversionno = edtVersionNo.Text.ToString().Trim();
- //获取版本号后五位:
- int oldversionno1 = Convert.ToInt32(oldversionno.Remove(0, oldversionno.Length - 4));
- int newversionno = oldversionno1 + 1;
- // string strversionno = oldversionno.Substring(0, strversionno.Length - 5) + newversionno.ToString();
- //校验编辑框信息
- if (string.IsNullOrEmpty(strid))
- {
- MessageBox.Show("操作失败:ID不能为空", "提示");
- edtIdC.Focus();
- return;
- }
- if (string.IsNullOrEmpty(strgradelevel) || string.IsNullOrEmpty(strgradevalue))
- {
- MessageBox.Show("操作失败:请选择品位级别", "提示");
- edtGradeLevel.Focus();
- return;
- }
- if (string.IsNullOrEmpty(strpriceval) )
- {
- MessageBox.Show("操作失败:计价值不能为空", "提示");
- edtPriceValue.Focus();
- return;
- }
- if (!Isdecimal(strpriceval))
- {
- MessageBox.Show("操作失败:计价值需为有效数字", "提示");
- edtPriceValue.Focus();
- return;
- }
- if (newversionno>9999)
- {
- MessageBox.Show("操作失败:该ID的版本号已用完,请联系管理员", "提示");
- return;
- }
- if (string.IsNullOrEmpty(oldversionno))
- {
- MessageBox.Show("操作失败:获取的版本号出错", "提示");
- return;
- }
- //提示是否需要修改
- if (MessageBox.Show("将修改明细表ID为[" + strid + "]的信息?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
- {
- //构建实体类
- BalanceBasepriceC pc= new BalanceBasepriceC();
- pc.Id = strid;
- pc.VersionNo = oldversionno;
- pc.GradeLevel = strgradelevel;
- pc.GradeValue = strgradevalue;
- pc.Remark = strremark;
- pc.Validflag = "1";
- pc.PriceVal = strpriceval;
- pc.UpdateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pc.UpdateTime = DateTime.Now;
- pc.UpdateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceCService", "doUpdateBasePriceC", new object[] { pc });
- if (re.Resultcode == 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("修改成功", "提示");
- QureyBasePriceM();
- BalanceClassCommon.doActiveSelRow(ultraGrid1, "id", oldstrid);
- BalanceClassCommon.doActiveSelRow(ultraGrid2, "id", strid);
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- }
- else
- {
- MessageBox.Show("操作失败:请选择需修改的基价标准明细行", "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- private void AddBasePriceC()
- {
- try
- {
- //判断是否获取到焦点
- if (ultraGrid1.ActiveRow != null)
- {
- string strstandid = ultraGrid1.ActiveRow.Cells["id"].Value.ToString().Trim();
- //获取编辑框信息
- string strgradelevel = edtGradeLevel.Text == null ? "" : edtGradeLevel.Text.ToString().Trim();
- string strgradevalue = edtGradeLevel.Value == null ? "" : edtGradeLevel.Value.ToString().Trim();
- string strpriceval = edtPriceValue.Text.ToString().Trim();
- string strremark = edtRemark.Text.ToString().Trim();
- string versionno = strstandid+"0001";
- //校验编辑框信息
- if (string.IsNullOrEmpty(strstandid))
- {
- MessageBox.Show("操作失败:请选择需要新增明细的基价标准行", "提示");
- EdtstandId.Focus();
- return;
- }
- if (string.IsNullOrEmpty(strgradelevel) || string.IsNullOrEmpty(strgradevalue))
- {
- MessageBox.Show("操作失败:请选择品位级别", "提示");
- edtGradeLevel.Focus();
- return;
- }
- if (string.IsNullOrEmpty(strpriceval))
- {
- MessageBox.Show("操作失败:计价值不能为空", "提示");
- edtPriceValue.Focus();
- return;
- }
- if (!Isdecimal(strpriceval))
- {
- MessageBox.Show("操作失败:计价值需为有效数字", "提示");
- edtPriceValue.Focus();
- return;
- }
- if (string.IsNullOrEmpty(versionno))
- {
- MessageBox.Show("操作失败:生成的版本号出错", "提示");
- edtVersionNo.Focus();
- return;
- }
- //提示是否需要修改
- if (MessageBox.Show("将为ID[" + strstandid + "]的基价标准新增一条明细信息?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
- {
- //构建实体类
- BalanceBasepriceC pc = new BalanceBasepriceC();
- pc.VersionNo = versionno;
- pc.StandId = strstandid;
- pc.GradeLevel = strgradelevel;
- pc.GradeValue = strgradevalue;
- pc.Remark = strremark;
- pc.Validflag = "1";
- pc.PriceVal = strpriceval;
- pc.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pc.CreateTime = DateTime.Now;
- pc.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceCService", "doAddBasePriceC", new object[] { pc });
- if (re.Resultcode == 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("新增成功", "提示");
- QureyBasePriceM();
- BalanceClassCommon.doActiveSelRow(ultraGrid1, "id", strstandid);
- BalanceClassCommon.doActiveSelRow(ultraGrid2, "versionNo", versionno);
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- }
- else
- {
- MessageBox.Show("操作失败:请选择需新增的基价标准行", "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- /// <summary>
- /// 删除一条基价标准主表行信息
- /// </summary>
- private void DeleteBasePriceM()
- {
- try
- {
- //判断是否获取到焦点
- if (ultraGrid1.ActiveRow != null)
- {
- string oldstrname = ultraGrid1.ActiveRow.Cells["name"].Value.ToString().Trim();
- string oldstrid = ultraGrid1.ActiveRow.Cells["id"].Value.ToString().Trim();
- string oldstritemcode = ultraGrid1.ActiveRow.Cells["itemCode"].Value.ToString().Trim();
- //提示是否需要修改
- if (MessageBox.Show("将删除名称为[" + oldstrname + "]的基价标准信息?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
- {
- //构建实体类
- BalanceBasepriceM pm = new BalanceBasepriceM();
- pm.Validflag = "0";
- pm.Id = oldstrid;
- pm.ItemCode = oldstritemcode;
- pm.DeleteName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pm.DeleteTime = DateTime.Now;
- pm.DeleteUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceMService", "doUpdateBasePriceM", new object[] { pm });
- if (re.Resultcode == 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("删除成功", "提示");
- QureyBasePriceM();
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- }
- else
- {
- MessageBox.Show("操作失败:请选择需修改的基价标准行", "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- /// <summary>
- /// 编辑基价标准行信息
- /// </summary>
- private void EditBasePriceM()
- {
- try
- {
- //判断是否获取到焦点
- if (ultraGrid1.ActiveRow != null)
- {
- string oldstrid = ultraGrid1.ActiveRow.Cells["id"].Value.ToString().Trim();
- string oldstrname = ultraGrid1.ActiveRow.Cells["name"].Value.ToString().Trim();
- //获取编辑框信息
- string strname = edtName.Text.ToString().Trim();
- string stritemCode = edtItemCode.Text.ToString().Trim();
- String stritemAttrId = edtItemAttrId.Text.ToString().Trim();
- string strremark = edtRemark.Text.ToString().Trim();
- //校验编辑框信息
- if (string.IsNullOrEmpty(strname))
- {
- MessageBox.Show("操作失败:名称不能为空", "提示");
- edtName.Focus();
- return;
- }
- if (string.IsNullOrEmpty(stritemCode))
- {
- MessageBox.Show("操作失败:请选择物料", "提示");
- edtItemCode.Focus();
- return;
- }
- //提示是否需要修改
- if (MessageBox.Show("将修改ID为[" + oldstrid + "]的基价标准信息?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
- {
- //构建实体类
- BalanceBasepriceM pm = new BalanceBasepriceM();
- pm.Id = oldstrid;
- pm.Name = strname;
- pm.ItemCode = stritemCode;
- pm.ItemAttrId = stritemAttrId;
- pm.Remark = strremark;
- pm.Validflag = "1";
- pm.UpdateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pm.UpdateTime = DateTime.Now;
- pm.UpdateUserid= CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceMService", "doUpdateBasePriceM", new object[] { pm });
- if (re.Resultcode == 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("修改成功", "提示");
- QureyBasePriceM();
- BalanceClassCommon.doActiveSelRow(ultraGrid1, "id", oldstrid);
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- }
- else
- {
- MessageBox.Show("操作失败:请选择需修改的基价标准行", "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- /// <summary>
- /// 新增一条基价标准主表行信息
- /// </summary>
- private void AddBasePriceM()
- {
- try
- {
- //获取编辑框信息
- string strname = edtName.Text.ToString().Trim();
- string stritemCode = edtItemCode.Text.ToString().Trim();
- String stritemAttrId = edtItemAttrId.Text.ToString().Trim();
- string strremark = edtRemark.Text.ToString().Trim();
- //校验编辑框信息
- if (string.IsNullOrEmpty(strname))
- {
- MessageBox.Show("操作失败:名称不能为空", "提示");
- edtName.Focus();
- return;
- }
- if (string.IsNullOrEmpty(stritemCode))
- {
- MessageBox.Show("操作失败:请选择物料", "提示");
- edtItemCode.Focus();
- return;
- }
- //构建实体类
- BalanceBasepriceM pm = new BalanceBasepriceM();
- pm.Name = strname;
- pm.ItemName = strname;
- pm.ItemCode = stritemCode;
- pm.ItemAttrId = stritemAttrId;
- pm.Remark = strremark;
- pm.Validflag = "1";
- pm.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
- pm.CreateTime = DateTime.Now;
- pm.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
- pm.DepartId = this.UserInfo.GetDeptid();
- pm.EffectiveTime = DateTime.Now;
- //调用服务接口
- CoreResult re = this.execute<CoreResult>("com.hnshituo.pur.balance.service.BalanceBasepriceMService", "doAddBasePriceM", new object[] { pm });
- if (re.Resultcode== 0)
- {
- //DataTable tempData = (DataTable)re.Resultdata;
- //GridHelper.CopyDataToDatatable(ref re.Resultdata, ref dataTable1, true);
- MessageBox.Show("新增成功", "提示");
- QureyBasePriceM();
- BalanceClassCommon.doActiveSelRow(ultraGrid1, "name", strname);
- }
- else
- {
- MessageBox.Show("操作失败:" + re.Resultmsg, "提示");
- return;
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- /// <summary>
- /// 查询主表数据
- /// </summary>
- private void QureyBasePriceM()
- {
- try
- {
- //获取查询框数据
- string strid = QId.Text.ToString().Trim();
- string strname = Qname.Text.ToString().Trim();
- //构建查询实体类
- BalanceBasepriceM pm = new BalanceBasepriceM();
- pm.Id = strid;
- pm.ItemName = strname;
- //调用服务器查询API进行查询
- DataTable re = this.execute<DataTable>("com.hnshituo.pur.balance.service.BalanceBasepriceMService", "doQureyBasePriceM", new object[] { pm });
- GridHelper.CopyDataToDatatable(ref re, ref dataTable1, true);
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:"+ex.Message, "提示");
- }
- }
- #endregion
- #region 页面点击事件
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- //加载数据到编辑区
- string strid = ultraGrid1.ActiveRow.Cells["id"].Value.ToString().Trim();
- string strname = ultraGrid1.ActiveRow.Cells["name"].Value.ToString().Trim();
- string stritemCode = ultraGrid1.ActiveRow.Cells["itemCode"].Value.ToString().Trim();
- string stritemName = ultraGrid1.ActiveRow.Cells["itemName"].Value.ToString().Trim();
- string strremark = ultraGrid1.ActiveRow.Cells["remark"].Value.ToString().Trim();
- string stritemAttr = ultraGrid1.ActiveRow.Cells["itemAttr"].Value.ToString().Trim();
- string stritemAttrId = ultraGrid1.ActiveRow.Cells["itemAttrId"].Value.ToString().Trim();
- edtId.Text = strid;
- edtName.Text = strname;
- edtItemCode.Text = stritemCode;
- edtItemName.Text = stritemName;
- edtRemark.Text = strremark;
- edtItemAttr.Text = stritemAttr;
- edtItemAttrId.Text = stritemAttrId;
- //点击主表加载从表
- if (string.IsNullOrEmpty(strid))
- {
- MessageBox.Show("操作失败:获取的ID为空", "提示");
- }
- //构建实体类
- BalanceBasepriceC pc = new BalanceBasepriceC();
- pc.StandId = strid;
- pc.Validflag = "1";
- //调用服务器查询API进行查询
- DataTable re = this.execute<DataTable>("com.hnshituo.pur.balance.service.BalanceBasepriceCService", "doQureyBasePriceC", new object[] { pc });
- GridHelper.CopyDataToDatatable(ref re, ref dataTable2, true);
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- //加载数据到编辑区
- string strid = ultraGrid2.ActiveRow.Cells["id"].Value.ToString().Trim();
- string strversionno = ultraGrid2.ActiveRow.Cells["versionNo"].Value.ToString().Trim();
- string strgradeLevel = ultraGrid2.ActiveRow.Cells["gradeLevel"].Value.ToString().Trim();
- string strpriceVal = ultraGrid2.ActiveRow.Cells["priceVal"].Value.ToString().Trim();
- string strremark = ultraGrid2.ActiveRow.Cells["remark"].Value.ToString().Trim();
- string strstandId = ultraGrid2.ActiveRow.Cells["standId"].Value.ToString().Trim();
- edtIdC.Text = strid;
- edtRemarkC.Text = strremark;
- edtVersionNo.Text = strversionno;
- edtGradeLevel.Text = strgradeLevel;
- edtPriceValue.Text = strpriceVal;
- EdtstandId.Text = strstandId;
- }
- catch (Exception ex)
- {
- MessageBox.Show("操作失败:" + ex.Message, "提示");
- }
- }
- private void clearEdtArea()
- {
- foreach (Control ctr in ultraTabControl1.Controls)
- {
- if (ctr is Label)
- { continue; }
- if (ctr is UltraCheckEditor)
- {
- UltraCheckEditor ultcmb = (UltraCheckEditor)ctr;
- // ultChkSuppUon.Checked = false;
- }
- ctr.Text = null;
- }
- }
- private void edtItemName_EditorButtonClick(object sender, EditorButtonEventArgs e)
- {
- FrmPurPlanMat matfrm = new FrmPurPlanMat(this.ob);
- matfrm.ShowDialog();
- string strmatcode = matfrm.getItemCode();
- string strmatname = matfrm.getItemName();
- string stritemAttr = matfrm.ItemAttr;
- string stritemAttrId = matfrm.ItemAttrId;
- edtItemCode.Text = strmatcode;
- edtItemName.Text = strmatname;
- edtItemAttr.Text = stritemAttr;
- edtItemAttrId.Text = stritemAttrId;
- }
- private void ultraGrid1_AfterCellActivate(object sender, EventArgs e)
- {
- ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[0];
- }
- private void ultraGrid2_AfterCellActivate(object sender, EventArgs e)
- {
- ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[1];
- }
- #endregion
- #region 正则表达式
- public bool Isdecimal(string str)
- {
- decimal y;
- return decimal.TryParse(str,out y);
- }
- public bool IsInts(string str)
- {
- int y ;
- return int.TryParse(str, out y);
- }
- #endregion
- }
- }
|