Exemplo n.º 1
0
 private void btnSaveSSJL2_Click(object sender, EventArgs e)
 {
     MySqlParameter[] ps = new MySqlParameter[] {
         new MySqlParameter("@c_content", this.rtbSSLR_SSJL.Rtf),
         new MySqlParameter("@id", this.controlId)
     };
     SqlHelper4MySql.ExecuteNonQuery(SqlCommandHelpler.T_CONTROL_UPDATE_CONTENT_BY_ID, ps);
     MessageBox.Show("保存成功!");
 }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            string orderId = this.tbRank.Text;
            string name    = this.tbName.Text;
            string desc    = this.tbDesc.Text;

            if (string.IsNullOrEmpty(orderId))
            {
                MessageBox.Show("请输入排列顺序!");
                return;
            }
            else
            {
                try
                {
                    Convert.ToInt32(orderId);
                }
                catch (Exception)
                {
                    MessageBox.Show("排列顺序请输入数字!");
                    return;
                }
            }
            if (string.IsNullOrEmpty(name))
            {
                MessageBox.Show("请输入协议名称!");
                return;
            }
            if (string.IsNullOrEmpty(desc))
            {
                MessageBox.Show("请输入协议描述!");
                return;
            }


            MySqlParameter[] ps = new MySqlParameter[] {
                new MySqlParameter("@c_order_id", orderId),
                new MySqlParameter("@c_name", name),
                new MySqlParameter("@c_desc", desc)
            };
            SqlHelper4MySql.ExecuteNonQuery(SqlCommandHelpler.T_CONTROL_INSERT, ps);
            MessageBox.Show("保存成功!");

            this.tbRank.Text = "";
            this.tbName.Text = "";
            this.tbDesc.Text = "";
        }
Exemplo n.º 3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            string orderId = this.tbRank.Text;
            string name    = this.tbName.Text;
            string desc    = this.tbDesc.Text;

            if (string.IsNullOrEmpty(orderId))
            {
                MessageBox.Show("请输入排列顺序!");
                return;
            }
            else
            {
                try
                {
                    Convert.ToInt32(orderId);
                }
                catch (Exception)
                {
                    MessageBox.Show("排列顺序请输入数字!");
                    return;
                }
            }
            if (string.IsNullOrEmpty(name))
            {
                MessageBox.Show("请输入协议名称!");
                return;
            }

            MySqlParameter[] ps = new MySqlParameter[] {
                new MySqlParameter("@c_order_id", orderId),
                new MySqlParameter("@c_name", name),
                new MySqlParameter("@c_desc", desc)
            };
            SqlHelper4MySql.ExecuteNonQuery(SqlCommandHelpler.T_CONTROL_INSERT, ps);
            DialogResult dr = MessageBox.Show("保存成功,是否退出?", "信息提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }

            this.tbRank.Text = "";
            this.tbName.Text = "";
            this.tbDesc.Text = "";
        }