| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- 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.Server;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- using System.Collections;
- using Core.Mes.Client.Comm.Tool;
- namespace Core.StlMes.Client.SaleBase
- {
- public partial class FrmBasePrdcrRStation : FrmBase
- {
- public FrmBasePrdcrRStation()
- {
- InitializeComponent();
- }
- private void FrmBasePrdcrRStation_Load(object sender, EventArgs e)
- {
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- DoQuery();
- break;
- case "Save":
- DoSave();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void DoQuery()
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.sale.base.CoreBasePrdcrRStation.getPrdcrInfo", null, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- }
- private void DoSave()
- {
- ultragdPrdcr.UpdateData();
- ultragdStation.UpdateData();
- UltraGridRow ugr = ultragdPrdcr.ActiveRow;
- string baseCode = ugr.Cells["BASECODE"].Value.ToString();
- string baseName = ugr.Cells["BASENAME"].Value.ToString();
- ArrayList parm = new ArrayList();
- if (MessageUtil.ShowYesNoAndQuestion("是否保存数据?") == DialogResult.No) return;
- foreach (UltraGridRow row in ultragdStation.Rows)
- {
- if (row.Cells["CHK"].Value.ToString().ToUpper() == "TRUE")
- {
- ArrayList list = new ArrayList();
- list.Add(baseCode);
- list.Add(baseName);
- list.Add(row.Cells["STATION_CODE"].Value.ToString());
- list.Add(row.Cells["STATION_DESC"].Value.ToString());
- list.Add(row.Cells["PROCESS_CDOE"].Value.ToString());
- list.Add(row.Cells["PROCESS_DESC"].Value.ToString());
- list.Add(row.Cells["PROCESS_CDOE_C"].Value.ToString());
- list.Add(row.Cells["PROCESS_DESC_C"].Value.ToString());
- list.Add(UserInfo.GetUserName());
- parm.Add(list);
- }
- }
- int count = ServerHelper.SetData("com.steering.pss.sale.base.CoreBasePrdcrRStation.save", new object[] { baseCode, parm }, this.ob);
- if (count > 0)
- {
- MessageUtil.ShowTips("保存成功!");
- }
- }
- private void ultragdPrdcr_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow ugr = ultragdPrdcr.ActiveRow;
- if (ugr == null)
- return;
- string baseCode = ugr.Cells["BASECODE"].Value.ToString();
- DataTable dt = ServerHelper.GetData("com.steering.pss.sale.base.CoreBasePrdcrRStation.getStationInfo", new object[] { baseCode }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable2, true);
- }
- }
- }
|