南京云海wcs代码
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.

73 lines
3.3 KiB

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DBFactory;
namespace wcfControlMonitorClient
{
/// <summary>
/// 20101011新增加出入库站台属性定义
/// </summary>
public partial class FrmIOStation : Form
{
DBOperator dbo = CStaticClass.dbo;
DBOperator dboM = CStaticClass.dboM;
private static FrmIOStation _formInstance;
public static FrmIOStation FormInstance
{
get
{
if (_formInstance == null)
{
_formInstance = new FrmIOStation();
}
return _formInstance;
}
set { _formInstance = value; }
}
public FrmIOStation()
{
InitializeComponent();
_formInstance = this;
}
private void button1_Click(object sender, EventArgs e)
{
if (this.comboBox2.Text.Trim()=="")
{
MessageBox.Show("请选择提升机使用方式!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.comboBox2.Focus();
return;
}
if (this.comboBox2.Text.Trim() == "各自分边")
{
dbo.ExceSQL("update T_Base_Route_Device set F_DeviceIndex=(case when F_DeviceIndex in(32001,32002) then 32002 when F_DeviceIndex in(25001,25002) then 25002 when F_DeviceIndex in(25003,25004) then 25004 when F_DeviceIndex in(62011,62010) then 62010 when F_DeviceIndex in(62001,62002) then 62002 when F_DeviceIndex in(22001,22002) then 22002 else F_DeviceIndex end) where F_RouteID in(25,30)");
dbo.ExceSQL("update T_Base_Route_Device set F_DeviceIndex=(case when F_DeviceIndex in(32001,32002) then 32001 when F_DeviceIndex in(25001,25002) then 25001 when F_DeviceIndex in(25003,25004) then 25003 when F_DeviceIndex in(62011,62010) then 62011 when F_DeviceIndex in(62001,62002) then 62001 when F_DeviceIndex in(22001,22002) then 22001 else F_DeviceIndex end) where F_RouteID in(26,29,38)");
}
else if (this.comboBox2.Text.Trim() == "均走左边")
{
dbo.ExceSQL("update T_Base_Route_Device set F_DeviceIndex=(case when F_DeviceIndex in(32001,32002) then 32001 when F_DeviceIndex in(25001,25002) then 25001 when F_DeviceIndex in(25003,25004) then 25003 when F_DeviceIndex in(62011,62010) then 62011 when F_DeviceIndex in(62001,62002) then 62001 when F_DeviceIndex in(22001,22002) then 22001 else F_DeviceIndex end) where F_RouteID in(26,29,25,30,38)");
}
else if (this.comboBox2.Text.Trim() == "均走右边")
{
dbo.ExceSQL("update T_Base_Route_Device set F_DeviceIndex=(case when F_DeviceIndex in(32001,32002) then 32002 when F_DeviceIndex in(25001,25002) then 25002 when F_DeviceIndex in(25003,25004) then 25004 when F_DeviceIndex in(62011,62010) then 62010 when F_DeviceIndex in(62001,62002) then 62002 when F_DeviceIndex in(22001,22002) then 22002 else F_DeviceIndex end) where F_RouteID in(25,30,26,29,38)");
}
MessageBox.Show("更新成功");
}
private void FrmIOStation_FormClosing(object sender, FormClosingEventArgs e)
{
_formInstance = null;
}
}
}