Example #1
0
 private void btnClear_Click_1(object sender, EventArgs e)
 {
     txtISBN.Text     = "";
     txtName.Text     = "";
     txtPrice.Text    = "";
     txtQuantity.Text = "";
     txtDesc.Text     = "";
     txtPrice.Text    = "";
     txtStatus.Text   = "";
     ListAuthors.ClearSelected();
     ListCategory.ClearSelected();
     cboPublisher.SelectedIndex = 0;
 }
Example #2
0
 private void AddBook_Load(object sender, EventArgs e)
 {
     ListAuthors.DataSource         = proxy.GetAllBookAuthor();
     ListAuthors.DisplayMember      = "Name";
     ListAuthors.ValueMember        = "Id";
     ListCategory.DataSource        = proxy.GetBookAllCategory();
     ListCategory.DisplayMember     = "name";
     ListCategory.ValueMember       = "Id";
     ListCategory.SelectionMode     = SelectionMode.MultiExtended;
     ListAuthors.SelectionMode      = SelectionMode.MultiExtended;
     publishYearPicker.Format       = DateTimePickerFormat.Custom;
     publishYearPicker.CustomFormat = "yyyy";
     publishYearPicker.ShowUpDown   = true;
     cboPublisher.DataSource        = proxy.getAllPublisher();
     cboPublisher.DisplayMember     = "name";
     cboPublisher.ValueMember       = "id";
     ListAuthors.ClearSelected();
 }
Example #3
0
        public UpdateBook(int ID)
        {
            InitializeComponent();
            ChannelFactory <IBussinessLogic> chanel = new ChannelFactory <IBussinessLogic>("ClientEndPoint");

            proxy = chanel.CreateChannel();
            book  = proxy.GetBookDataByID(ID);
            ListAuthors.DataSource     = proxy.GetAllBookAuthor();
            ListAuthors.DisplayMember  = "name";
            ListAuthors.ValueMember    = "id";
            ListCategory.DataSource    = proxy.GetBookAllCategory();
            ListCategory.DisplayMember = "name";
            ListCategory.ValueMember   = "id";
            cboPublisher.DataSource    = proxy.getAllPublisher();
            cboPublisher.DisplayMember = "name";
            cboPublisher.ValueMember   = "id";
            ListAuthors.ClearSelected();
            ListCategory.ClearSelected();
            ListAuthors.SelectionMode  = SelectionMode.MultiExtended;
            ListCategory.SelectionMode = SelectionMode.MultiExtended;
            this.MaximizeBox           = false;
            this.MinimizeBox           = false;
        }