private bool deleteDocGia() { try { BUS_DocGia deleteAuthor = new BUS_DocGia(); deleteAuthor.deleteDocGia(this.authorId); return(true); } catch (Exception e) { return(false); } }
private bool InsertReader() { try { BUS_DocGia insertReader = new BUS_DocGia(); int gioitinh = 1; if (radGTMale.Checked == false) { gioitinh = 0; } DTO_DocGia dtoReader = new DTO_DocGia(0, txtReaderName.Text, int.Parse(txtNK.Text), gioitinh); insertReader.insertdocgia(dtoReader); return(true); } catch (Exception e) { return(false); } }
private bool UpdateReader() { try { BUS_DocGia updateAuthor = new BUS_DocGia(); int gioitinh = 1; if (radGTMale.Checked == false) { gioitinh = 0; } DTO_DocGia dtoReader = new DTO_DocGia(this.authorId, txtReaderName.Text, int.Parse(txtNK.Text), gioitinh); updateAuthor.updateDocGia(dtoReader); return(true); } catch (Exception e) { return(false); } }