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 MyDataAccess;
using System.Data.SqlClient;

namespace Amozeshgah
{
    public partial class mManagment : Form
    {
        public mManagment()
        {
            InitializeComponent();
        }

        cDataAccess cData = new cDataAccess(clsPath.ConnectionString());
        static SqlConnection con = new SqlConnection(clsPath.ConnectionString());
        SqlDataAdapter da = new SqlDataAdapter("", con);
        DataSet ds = new DataSet();

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            cData.Sql_Command.Parameters.AddWithValue("@UserName", txtUserName.Text);
            cData.Sql_Command.Parameters.AddWithValue("@Password", txtPass.Text);

            string sql = "UPDATE [tLoginModir] SET [UserName]=@UserName,[Password]=@Password";

            cData.ExecuteNonQuery(sql);
            cData.Sql_Command.Parameters.Clear();

        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
