private void btnSave_Click(object sender, EventArgs e)
        {
            int i = 0;

            if (txtMemberName.Text == "")
            {
                MessageBox.Show("Member Name shouldn't be black.");
                return;
            }

            if (member_id > 0)
            {
                member.MemberName  = txtMemberName.Text;
                member.Address     = txtAddress.Text;
                member.PhoneNumber = txtPhoneNumber.Text;
                member.NIRC        = txtNIRCNumber.Text;
                member.Email       = txtEmail.Text;

                i = EntityBroker.updateMember(member);
            }
            else
            {
                Member mb = new Member();
                mb.MemberName  = txtMemberName.Text;
                mb.Address     = txtAddress.Text;
                mb.PhoneNumber = txtPhoneNumber.Text;
                mb.NIRC        = txtNIRCNumber.Text;
                mb.Email       = txtEmail.Text;

                i = EntityBroker.createMember(mb);
            }


            if (i == 1)
            {
                MessageBox.Show("Member Information Saved");
                //#TODO::
                //ucListMember ml = new ucListMember();
                //ml.setMainWindowRefrence(MainWindowObject);
                //MainWindowObject.RequestContentChange(ml);

                ParentWindowObject.Close();
            }
            else
            {
                MessageBox.Show("Error in updating. Error code :: {0}", i.ToString());
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            int i = 0;

            if (txtBookTitle.Text == "")
            {
                MessageBox.Show("Book Title shouldn't be empty.");
                return;
            }
            if (txtRentalPricePerDay.Text == "")
            {
                MessageBox.Show("Rental Price shouldn't be empty.");
                return;
            }
            if (maxAvaiableDaysToRent.Text == "")
            {
                MessageBox.Show("Max Avaiable Days To Rent shouldn't be empty.");
                return;
            }

            if (book_model_id > 0)
            {
                bookmodel.BookTitle             = lblBookTitlePageTitle.Text;
                bookmodel.BookTitle             = txtBookTitle.Text;
                bookmodel.BookDescription       = (string)txtBookDescription.Text;
                bookmodel.Author                = txtAuthor.Text;
                bookmodel.BookCategory          = txtBookCategory.Text;
                bookmodel.PublisherName         = txtPublisherName.Text;
                bookmodel.PublishDate           = dtpPublishDate.Value;
                bookmodel.RentalPricePerDay     = (decimal)Convert.ToDouble(txtRentalPricePerDay.Text);
                bookmodel.MaxAvailableDayToRent = (short)Convert.ToInt32(maxAvaiableDaysToRent.Text);

                i = EntityBroker.updateBookModel(bookmodel);
            }
            else
            {
                BooksModel bm = new BooksModel();

                bm.BookTitle             = (string)txtBookTitle.Text;
                bm.BookDescription       = (string)txtBookDescription.Text;
                bm.Author                = (string)txtAuthor.Text;
                bm.BookCategory          = (string)txtBookCategory.Text;
                bm.PublisherName         = (string)txtPublisherName.Text;
                bm.PublishDate           = dtpPublishDate.Value;
                bm.RentalPricePerDay     = (decimal)Convert.ToDouble(txtRentalPricePerDay.Text);
                bm.MaxAvailableDayToRent = (short)Convert.ToDouble(maxAvaiableDaysToRent.Text);

                i = EntityBroker.createNewBookModel(bm);
            }


            if (i == 1)
            {
                MessageBox.Show("Book Information Saved");

                ucListBooks booklist = new ucListBooks();
                booklist.setMainWindowRefrence(MainWindowObject);
                MainWindowObject.RequestContentChange(booklist);

                ParentWindowObject.Close();
            }
            else
            {
                MessageBox.Show("Error in updating. Error code :: {0}", i.ToString());
            }
        }