| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- 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 System.Collections;
- using CoreFS.CA06;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- namespace Core.StlMes.Client.Plan.Order
- {
- public partial class FrmJgxGroup : FrmBase
- {
- public FrmJgxGroup()
- {
- InitializeComponent();
- }
- public FrmJgxGroup(OpeBase ops)
- {
- this.ob = ops;
- InitializeComponent();
- }
- private void FrmJgxGroup_Load(object sender, EventArgs e)
- {
- queryPlanWeight();
- }
- private void queryPlanWeight()
- {
- DataTable dtGroup = ServerHelper.GetData("com.steering.pss.plan.order.CoreSaleOrderOP.queryBaseinfoSort",
- new object[] { "2005" }, this.ob);
- DataTable dt1 = ServerHelper.GetData("com.steering.pss.plan.order.CoreSaleOrderOP.queryJgxPlanWeight",
- new object[] { DateTime.Now.AddMonths(-1).ToString("yyyy-MM") }, this.ob);
- DataTable dt2 = ServerHelper.GetData("com.steering.pss.plan.order.CoreSaleOrderOP.queryJgxPlanWeight",
- new object[] { DateTime.Now.ToString("yyyy-MM") }, this.ob);
- DataTable dt3 = ServerHelper.GetData("com.steering.pss.plan.order.CoreSaleOrderOP.queryJgxPlanWeight",
- new object[] { DateTime.Now.AddMonths(1).ToString("yyyy-MM") }, this.ob);
- DataTable dt = new DataTable();
- dt.Columns.Add("GROUP_JGX");
- dt.Columns.Add("PLANWEIGHT1");
- dt.Columns.Add("PLANWEIGHT2");
- dt.Columns.Add("PLANWEIGHT3");
- foreach (DataRow row in dtGroup.Rows)
- {
- DataRow dr = dt.NewRow();
- dr["GROUP_JGX"] = row["BASENAME"].ToString();
- dt1.DefaultView.RowFilter = "GROUP_JGX='" + row["BASENAME"].ToString() + "'";
- if (dt1.DefaultView.ToTable() != null && dt1.DefaultView.ToTable().Rows.Count > 0)
- {
- dr["PLANWEIGHT1"] = dt1.DefaultView.ToTable().Rows[0]["PLANWEIGHT"].ToString();
- }
- dt2.DefaultView.RowFilter = "GROUP_JGX='" + row["BASENAME"].ToString() + "'";
- if (dt2.DefaultView.ToTable() != null && dt2.DefaultView.ToTable().Rows.Count > 0)
- {
- dr["PLANWEIGHT2"] = dt2.DefaultView.ToTable().Rows[0]["PLANWEIGHT"].ToString();
- }
- dt3.DefaultView.RowFilter = "GROUP_JGX='" + row["BASENAME"].ToString() + "'";
- if (dt3.DefaultView.ToTable() != null && dt3.DefaultView.ToTable().Rows.Count > 0)
- {
- dr["PLANWEIGHT3"] = dt3.DefaultView.ToTable().Rows[0]["PLANWEIGHT"].ToString();
- }
- dt.Rows.Add(dr);
- }
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- PlanComm.setGridActivation(ultraGrid1.DisplayLayout.Bands[0]);
- }
- }
- }
|