You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
4.3 KiB
127 lines
4.3 KiB
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 QMAPP.FJC.Entity.Basic;
|
|
using QMAPP.ServicesAgent;
|
|
|
|
namespace QMAPP.WinForm.Forms.Injection
|
|
{
|
|
public partial class SlushMoldSet : Form
|
|
{
|
|
//
|
|
private List<MoldSet> moldList;
|
|
|
|
public SlushMoldSet()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void tsbSave_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
|
|
MoldSet set1 = moldList.First(o => o.ARMNUMBER == 1);
|
|
MoldSet set2 = moldList.First(o => o.ARMNUMBER == 2);
|
|
MoldSet set3 = moldList.First(o => o.ARMNUMBER == 3);
|
|
|
|
set1.MOLDNUMBERA = Convert.ToInt32(armOneA.SelectedValue);
|
|
set1.MOLDNUMBERB = Convert.ToInt32(armOneB.SelectedValue);
|
|
|
|
set2.MOLDNUMBERA = Convert.ToInt32(armTwoA.SelectedValue);
|
|
set2.MOLDNUMBERB = Convert.ToInt32(armTwoB.SelectedValue);
|
|
|
|
set3.MOLDNUMBERA = Convert.ToInt32(armThreeA.SelectedValue);
|
|
set3.MOLDNUMBERB = Convert.ToInt32(armThreeB.SelectedValue);
|
|
|
|
try
|
|
{
|
|
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
|
|
agent.InvokeServiceFunction<List<MoldSet>>(B9BasicService.MoldSetBLL_SaveMoldSet.ToString(), moldList);
|
|
|
|
MessageBox.Show("保存成功!");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
|
|
MessageBox.Show("系统异常!");
|
|
}
|
|
|
|
|
|
}
|
|
|
|
private void tsbClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void SlushMoldSet_Load(object sender, EventArgs e)
|
|
{
|
|
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
|
|
moldList = agent.InvokeServiceFunction<List<MoldSet>>(B9BasicService.MoldSetBLL_GetList.ToString());
|
|
|
|
this.armOneA.DisplayMember = "VALUE";
|
|
this.armOneA.ValueMember = "KEY";
|
|
|
|
this.armOneB.DisplayMember = "VALUE";
|
|
this.armOneB.ValueMember = "KEY";
|
|
|
|
this.armTwoA.DisplayMember = "VALUE";
|
|
this.armTwoA.ValueMember = "KEY";
|
|
|
|
this.armTwoB.DisplayMember = "VALUE";
|
|
this.armTwoB.ValueMember = "KEY";
|
|
|
|
this.armThreeA.DisplayMember = "VALUE";
|
|
this.armThreeA.ValueMember = "KEY";
|
|
|
|
this.armThreeB.DisplayMember = "VALUE";
|
|
this.armThreeB.ValueMember = "KEY";
|
|
|
|
|
|
|
|
List<object> arm1AList = new List<object>();
|
|
List<object> arm1BList = new List<object>();
|
|
List<object> arm2AList = new List<object>();
|
|
List<object> arm2BList = new List<object>();
|
|
List<object> arm3AList = new List<object>();
|
|
List<object> arm3BList = new List<object>();
|
|
|
|
for (int i = 1; i <= moldList[0].MOLDNUMBERMAX; i++)
|
|
{
|
|
arm1AList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
arm1BList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
arm2AList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
arm2BList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
arm3AList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
arm3BList.Add(new { VALUE = i.ToString(), KEY = i.ToString() });
|
|
|
|
}
|
|
|
|
armOneA.DataSource = arm1AList;
|
|
armOneB.DataSource = arm1BList;
|
|
armTwoA.DataSource = arm2AList;
|
|
armTwoB.DataSource = arm2BList;
|
|
armThreeA.DataSource = arm3AList;
|
|
armThreeB.DataSource = arm3BList;
|
|
|
|
|
|
MoldSet set1 = moldList.First(o => o.ARMNUMBER == 1);
|
|
armOneA.SelectedValue = set1.MOLDNUMBERA.ToString();
|
|
armOneB.SelectedValue = set1.MOLDNUMBERB.ToString();
|
|
|
|
MoldSet set2 = moldList.First(o => o.ARMNUMBER == 2);
|
|
armTwoA.SelectedValue = set2.MOLDNUMBERA.ToString();
|
|
armTwoB.SelectedValue = set2.MOLDNUMBERB.ToString();
|
|
|
|
MoldSet set3 = moldList.First(o => o.ARMNUMBER == 3);
|
|
armThreeA.SelectedValue = set3.MOLDNUMBERA.ToString();
|
|
armThreeB.SelectedValue = set3.MOLDNUMBERB.ToString();
|
|
|
|
}
|
|
}
|
|
}
|
|
|