| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- 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 Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.PlnSaleOrd.炉计划.Entity;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- using CoreFS.CA06;
- using System.Collections;
- using Core.StlMes.Client.PlnSaleOrd.工序排产.entity;
- namespace Core.StlMes.Client.PlnSaleOrd.炉计划
- {
- public partial class ComPlanEndJgx : UserControl
- {
- public string ordLnDlyPk = "";
- public string indexSeq = "";
- public string carftSeq = "";
- public bool flag = false;
- public ComPlanEndJgx()
- {
- InitializeComponent();
- }
- private void ComPlanEndJgx_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<PlnOrderJgxSOEntity>(entityGrid1.DisplayLayout.Bands[0]);
- }
- /// <summary>
- /// 查询轧管订单信息
- /// </summary>
- public void QueryPlanZg(string materialNo,string gradecode,OpeBase ob)
- {
- List<PlnOrderJgxSOEntity> listSource = EntityHelper.GetData<PlnOrderJgxSOEntity>("com.steering.pss.plnsaleord.planStove.FrmEndLibrary.getPlnOrderZgS",
- new object[] { materialNo, gradecode, "G" }, ob);
- plnOrderJgxSOEntityBindingSource.DataSource = listSource;
- GridHelper.RefreshAndAutoSize(entityGrid1);
- //plnOrderJgxSOEntityBindingSource.DataSource = listSource.Where(w => w.ReallWt > 0).ToList();
- if (listSource.Count == 0)
- {
- ordLnDlyPk = "";
- }
- }
- /// <summary>
- /// 利库
- /// </summary>
- /// <param name="materialNo"></param>
- /// <param name="ob"></param>
- public void doAddLibrary(ArrayList list, string userName, OpeBase ob, int countCic, string specCic)
- {
- UltraGridRow row = entityGrid1.ActiveRow;
- if (row == null) return;
- int count = 0;
- string proPlanId = "";
- string gxPlanNo = "";
- foreach (UltraGridRow ugr in entityGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- count++;
- proPlanId = ugr.Cells["ProPlanId"].Value.ToString();
- gxPlanNo = ugr.Cells["GxPlanNo"].Value.ToString();
- }
- }
- if (count == 0 || count > 1)
- {
- MessageUtil.ShowTips("请选择一个加工订单!");
- return;
- }
- if (specCic.Equals("") && countCic == 0)
- {
- MessageUtil.ShowTips("库存CIC在订单炼钢CIC集合里没有,请指定CIC!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认利库?") ==
- DialogResult.No)
- return;
- PlanComm.WaitFromOpen(this.Cursor);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmEndLibrary";
- ccp.MethodName = "doAddLibrary";
- ccp.ServerParams = new object[] { list,proPlanId,gxPlanNo,userName };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- PlanComm.WaitFromColse(this.Cursor);
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("利库成功!"))
- {
- flag = true;
- }
- }
- /// <summary>
- /// 物料改判
- /// </summary>
- /// <param name="materialNo"></param>
- /// <param name="ob"></param>
- public void doSentence(ArrayList list, string userName, OpeBase ob)
- {
- UltraGridRow row = entityGrid1.ActiveRow;
- if (row == null) return;
- int count = 0;
- string proPlanId = "";
- string gxPlanNo = "";
- foreach (UltraGridRow ugr in entityGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- count++;
- proPlanId = ugr.Cells["ProPlanId"].Value.ToString();
- gxPlanNo = ugr.Cells["GxPlanNo"].Value.ToString();
- }
- }
- if (count == 0 || count > 1)
- {
- MessageUtil.ShowTips("请选择一个轧管订单!");
- return;
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认改判?") ==
- DialogResult.No)
- return;
- PlanComm.WaitFromOpen(this.Cursor);
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.plnsaleord.planStove.FrmEndLibrary";
- ccp.MethodName = "doSentence";
- ccp.ServerParams = new object[] { list, proPlanId, gxPlanNo, userName };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- PlanComm.WaitFromColse(this.Cursor);
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("改判成功!"))
- {
- flag = true;
- }
- }
- private void entityGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow row = entityGrid1.ActiveRow;
- if (row == null) return;
- ordLnDlyPk = row.Cells["OrdLnDlyPk"].Value.ToString();
- indexSeq = row.Cells["IndexSeq"].Value.ToString();
- carftSeq = row.Cells["CraftSeq"].Value.ToString();
- }
- }
- }
|