예제 #1
0
        private bool deleteDocGia()
        {
            try
            {
                BUS_DocGia deleteAuthor = new BUS_DocGia();

                deleteAuthor.deleteDocGia(this.authorId);
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
            }
        }