forked from uwitec/Asset_Mng
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditsubtype.cs
More file actions
32 lines (30 loc) · 2 KB
/
Editsubtype.cs
File metadata and controls
32 lines (30 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Asset_Mng
{
public partial class editsubtype : Form
{
public editsubtype()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//MessageBox.Show(Type.nodname);
SqlConnection connection = Main.connection;
connection.Open();
string update = "Update زیر_نوع set نام ='" + textBox1.Text + "' WHERE نام='" + Type.list + "'and نوع='"+Type.node+"';";
//connection.Open();
SqlCommand command = new SqlCommand(update, connection);
command.ExecuteNonQuery();
connection.Close();
MessageBox.Show("با موفقیت انجام شد.", "پیغام", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}