| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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 UAS_LabelMachine.Entity;
- using UAS_LabelMachine.PublicMethod;
- namespace UAS_LabelMachine
- {
- public partial class 贴标角度设置 : Form
- {
- DataHelper dh = SystemInf.dh;
- string custcode;
- public 贴标角度设置(string CustCode)
- {
- custcode = CustCode;
- InitializeComponent();
- }
- private void 附件内容打印_Load(object sender, EventArgs e)
- {
- DataTable dt = (DataTable)dh.ExecuteSql("select * from PRINTXY where px_custcode='" + custcode + "' ", "select");
- if (dt.Rows.Count > 0)
- {
- X.Text = dt.Rows[0]["px_x"].ToString();
- Y.Text = dt.Rows[0]["px_y"].ToString();
- angle.Text = dt.Rows[0]["px_angle"].ToString();
- }
- }
- private void Confirm_Click(object sender, EventArgs e)
- {
- if (dh.CheckExist("PRINTXY", "px_custcode='" + custcode + "'"))
- {
- dh.ExecuteSql("update PRINTXY set px_x='"+X.Text+"',px_y='"+Y.Text+"',px_angle='"+angle.Text+"' and 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");
- }
- LogManager.DoCommandLog(custcode, User.UserCode, "保持贴标角度成功", "成功");
- MessageBox.Show("保存成功");
- Close();
- }
- }
- }
|