コード例 #1
0
        private void tbs_delete_Click(object sender, EventArgs e)
        {
            if (txtten.Text == "")
            {
                MessageBox.Show("Chưa chọn thông tin");
                return;
            }
            quanlinguoidung qlng = new quanlinguoidung();

            qlng.STT         = txtstt.Text;
            qlng.tendangnhap = txtten.Text;
            qlng.matkhau     = txtpass.Text;
            if (MessageBox.Show(string.Format("xóa người dùng"), "", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                if (Bus.DeleteProfile(qlng) > 0)
                {
                    MessageBox.Show("Đã xóa");
                    Quanlynguoidung_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("Thông tin chưa được xóa");
                }
            }
        }
コード例 #2
0
ファイル: Dao.cs プロジェクト: phuongthuy218/Nhansu
 public static int DeleteProfile(quanlinguoidung ql)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("STT", ql.STT),
     };
     return(DataProvider.ExcuteNonQuerry("xoand", para));
 }
コード例 #3
0
ファイル: Dao.cs プロジェクト: phuongthuy218/Nhansu
 public static int InsertProfile(quanlinguoidung ql)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@tendangnhap", ql.tendangnhap),
         new SqlParameter("@matkhau", ql.matkhau),
     };
     return(DataProvider.ExcuteNonQuerry("themnd", para));
 }
コード例 #4
0
        private void tbs_save_Click(object sender, EventArgs e)
        {
            if (txtten.Text == "")
            {
                MessageBox.Show("Chưa chọn thông tin");
                return;
            }
            quanlinguoidung qlng = new quanlinguoidung();

            qlng.tendangnhap = txtten.Text;
            qlng.matkhau     = txtpass.Text;
            if (MessageBox.Show(string.Format("Thêm người dùng"), "", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                if (Bus.InsertProfile(qlng) > 0)
                {
                    MessageBox.Show("Đã thêm");
                    Quanlynguoidung_Load(sender, e);
                }
                else
                {
                    MessageBox.Show("Tên người dùng đã tồn tại");
                }
            }
        }
コード例 #5
0
 public static int DeleteProfile(quanlinguoidung ql)
 {
     return(Dao.DeleteProfile(ql));
 }
コード例 #6
0
 public static int UpdateProfile(quanlinguoidung ql)
 {
     return(Dao.UpdateProfile(ql));
 }
コード例 #7
0
 public static int InsertProfile(quanlinguoidung ql)
 {
     return(Dao.InsertProfile(ql));
 }