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; }
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; }