-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathEdittype.cs
More file actions
42 lines (36 loc) · 2.29 KB
/
Edittype.cs
File metadata and controls
42 lines (36 loc) · 2.29 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
33
34
35
36
37
38
39
40
41
42
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 Edittype : Form
{
public Edittype()
{
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.nodname+"';";
//connection.Open();
SqlCommand command = new SqlCommand(update,connection);
command.ExecuteNonQuery();
connection.Close();
MessageBox.Show("با موفقیت انجام شد.","پیغام",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
}
}