Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Để tạo ra tên mạnh, một cặp khóa công khai-bí mật được tạo ra cho assembly. Một mã băm (hash code) được tạo ra từ tên, nội dung của các tập tin bên trong assembly và chuỗi biểu diễn khóa công khai. Sau đó mã băm này được mã hóa bằng khóa bí mật, kết quả mã hóa được ghi vào manifest. Quá trình trên được gọi là ký xác nhận vào assembly (signing the assembly). Khi assembly được CLR nạp vào bộ nhớ, CLR sẽ dùng khóa công khai trong manifest giải mã mã băm để xác định. | Truy cập dữ liệu với ADO.NET Gvhd Nguyễn Tấn Trần Minh Khang this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.Controls.Add this.txtCity this.label5 this.txtAddress this.label4 this.txtContactName this.label3 this.txtCompanyName this.label2 this.txtCompanyID this.label1 this.btnNew this.txtCustomerName this.btnUpdate this.lblMessage this.btnDelete this.lbCustomers Quản lý sự kiện nhấn nút tạo mới New protected void btnNew_Click object sender System.EventArgs e tạo một dòng mới DataRow newRow dataTable.NewRow newRow CustomerID txtCompanyID.Text newRow CompanyName txtCompanyName.Text newRow ContactName txtContactName.Text newRow ContactTitle txtContactTitle.Text newRow Address txtAddress.Text newRow City txtCity.Text newRow PostalCode txtZip.Text newRow Phone txtPhone.Text thêm một dòng mới vào bảng dataTable.Rows.Add newRow cập nhật vào cơ sở dữ liệu DataAdapter.Update DataSet Customers thông báo cho người dùng biết câu truy vấn thay đổi lblMessage.Text DataAdapter.UpdateCommand.CommandText Application.DoEvents DataSet.AcceptChanges hiển thị lại dữ liệu cho điều khiển ListBox PopulateLB Xoá trằng các TextBox ClearFields Xóa trắng các TextBox private void ClearFields txtCompanyID.Text txtCompanyName.Text txtContactName.Text txtContactTitle.Text txtAddress.Text 169 Truy cập dữ liệu với ADO.NET Gvhd Nguyễn Tấn Trần Minh Khang txtCity.Text txtzip.Text txtPhone.Text quản lý sự kiện nhất nút chọn cập nhật Update protected void btnUpdate_Click object sender EventArgs e lấy vể dòng được chọn trên ListBox DataRow targetRow dataTable.Rows lbCustomers.SelectedIndex thông báo cho người biết dòng cập nhật lblMessage.Text Updating targetRow CompanyName Application.DoEvents hiệu chỉnh dòng targetRow.BeginEdit targetRow CompanyName txtCustomerName.Text .