|
|
@@ -32,11 +32,52 @@ namespace UAS_LabelMachine
|
|
|
X.Text = dt.Rows[0]["px_x"].ToString();
|
|
|
Y.Text = dt.Rows[0]["px_y"].ToString();
|
|
|
angle.Text = dt.Rows[0]["px_angle"].ToString();
|
|
|
+ switch (dt.Rows[0]["px_type"].ToString().ToUpper())
|
|
|
+ {
|
|
|
+ case "TOP":
|
|
|
+ Top.Checked = true;
|
|
|
+ break;
|
|
|
+ case "COVER":
|
|
|
+ Cover.Checked = true;
|
|
|
+ break;
|
|
|
+ case "LEFT":
|
|
|
+ Left.Checked = true;
|
|
|
+ break;
|
|
|
+ case "RIGHT":
|
|
|
+ Right.Checked = true;
|
|
|
+ break;
|
|
|
+ case "BOTTOM":
|
|
|
+ Bottom.Checked = true;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void Confirm_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+ string Type = "";
|
|
|
+ if (Bottom.Checked)
|
|
|
+ {
|
|
|
+ Type = "Bottom";
|
|
|
+ }
|
|
|
+ if (Top.Checked)
|
|
|
+ {
|
|
|
+ Type = "Top";
|
|
|
+ }
|
|
|
+ if (Left.Checked)
|
|
|
+ {
|
|
|
+ Type = "Left";
|
|
|
+ }
|
|
|
+ if (Right.Checked)
|
|
|
+ {
|
|
|
+ Type = "Right";
|
|
|
+ }
|
|
|
+ if (Cover.Checked)
|
|
|
+ {
|
|
|
+ Type = "Cover";
|
|
|
+ }
|
|
|
if (angle.Text == "" || X.Text == "" || Y.Text == "")
|
|
|
{
|
|
|
MessageBox.Show("参数必须都填写");
|
|
|
@@ -44,11 +85,11 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
if (dh.CheckExist("PRINTXY", "px_custcode='" + custcode + "'"))
|
|
|
{
|
|
|
- dh.ExecuteSql("update PRINTXY set px_x='" + X.Text + "',px_y='" + Y.Text + "',px_angle='" + angle.Text + "' where px_custcode='" + custcode + "'", "update");
|
|
|
+ dh.ExecuteSql("update PRINTXY set px_x='" + X.Text + "',px_y='" + Y.Text + "',px_angle='" + angle.Text + "',px_type='" + Type + "' where px_custcode='" + custcode + "'", "update");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dh.ExecuteSql("insert into PRINTXY (px_x,px_y,px_angle,px_custcode)values('" + X.Text + "','" + Y.Text + "','" + angle.Text + "','" + custcode + "')", "insert");
|
|
|
+ dh.ExecuteSql("insert into PRINTXY (px_x,px_y,px_angle,px_custcode,px_type)values('" + X.Text + "','" + Y.Text + "','" + angle.Text + "','" + custcode + "','" + Type + "')", "insert");
|
|
|
}
|
|
|
LogManager.DoCommandLog(custcode, User.UserCode, "保持贴标角度成功", "成功");
|
|
|
MessageBox.Show("保存成功");
|