예제 #1
0
        public void update(TaiKhoanDTO info)
        {
            string updateCommand = "UPDATE TaiKhoan " +
                                    "SET MatKhau = '" + info.MatKhau + "', " +
                                    " QuyenTruyCap = '" + info.QuyenTruyCap + "', " +
                                    " WHERE TenDangNhap = '" + info.TenDangNhap + "'";

            executeNonQuery(updateCommand);
        }
예제 #2
0
        protected override object GetDataFromDataRow(DataTable dt, int i)
        {
            TaiKhoanDTO tk = new TaiKhoanDTO();
            tk.TenDangNhap = dt.Rows[i]["TenDangNhap"].ToString();
            tk.MatKhau = dt.Rows[i]["MatKhau"].ToString();
            tk.QuyenTruyCap = dt.Rows[i]["QuyenTruyCap"].ToString();

            return (object)tk;
        }
예제 #3
0
        public void insert(TaiKhoanDTO info)
        {
            string insertCommand = "INSERT INTO TaiKhoan VALUES('" +
                info.TenDangNhap + "', '" +
                info.MatKhau + "', '" +
                info.QuyenTruyCap + ")";

            executeNonQuery(insertCommand);
        }