コード例 #1
0
ファイル: Delete_Author.cs プロジェクト: hoangtien103/qltv
        private bool DeleteAuthor()
        {
            try
            {
                BUS_TacGia deleteAuthor = new BUS_TacGia();

                deleteAuthor.deleteTacGia(this.authorId);
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
コード例 #2
0
        private bool InsertAuthor()
        {
            try
            {
                BUS_TacGia insertAuthor = new BUS_TacGia();

                int gioitinh = 1;
                if (radGTMale.Checked == false)
                {
                    gioitinh = 0;
                }

                DTO_Tacgia dtoAuthor = new DTO_Tacgia(0, txtAuthorName.Text, dtpNgaySinh.Value.ToString("MM/dd/yyyy"), gioitinh);
                insertAuthor.insertTacGia(dtoAuthor);
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }