1.初始化项目。保险起见bin目录完整提交 2.基于现场代码为调整过的初始项目(此次提交还未解决代码差异问题)
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
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;
|
||||
|
||||
namespace AGVSystem
|
||||
{
|
||||
public partial class Point_loc_Set : Form
|
||||
{
|
||||
private ClsDBConn_sql db = new ClsDBConn_sql();
|
||||
public Point_loc_Set()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public Point_loc_Set(int x, int y)
|
||||
{
|
||||
InitializeComponent();
|
||||
num1.Value = x;
|
||||
num2.Value = y;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cmb.SelectedIndex > 0)
|
||||
{
|
||||
string sqlstr = "UPDATE [LandMarkInfo] " +
|
||||
" SET[Loc_X] =" + num1.Value +
|
||||
" ,[Loc_Y] = " + num2.Value +
|
||||
" ,[Binding] = " + cmb.SelectedIndex +
|
||||
" WHERE[Loc_ID]=" + num.Value + " And Assembly_Line=" + cmb_linelist.Text.Split('.')[0];
|
||||
if ("1" == db.Command(sqlstr))
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void Point_loc_Set_Load(object sender, EventArgs e)
|
||||
{
|
||||
DataSet ds = db.connDt("select CONVERT( VARCHAR(10),id) +' . '+ line_name as info from Assembly_Line order by id");
|
||||
if (ds.Tables.Count > 0)
|
||||
{
|
||||
if (ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
cmb_linelist.Items.Add("");
|
||||
foreach (DataRow dr in ds.Tables[0].Rows)
|
||||
{
|
||||
cmb_linelist.Items.Add(dr[0].ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
ds.Tables.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user