private void btnShowMyBids_Click(object sender, EventArgs e) { //createNewBidButtonDisabling(); //dgvBidsInfo.DataSource = null; BidService bidsToShow = new BidService(); dgvBidsInfo.DataSource = bidsToShow.GetMyBids(compId); // 2 is a company ID dgvBidsInfo.Columns["CompanyID"].Visible = false; dgvBidsInfo.Columns["QuoteID"].Visible = false; dgvBidsInfo.Columns["QuoteParticipantID"].Visible = false; dgvBidsInfo.Columns["QuoteBidID"].Visible = false; //dgvBidsInfo.Columns["CompanyType"].Visible = false; }
private void btnSave_Click(object sender, EventArgs e) { bool result = false; QuoteBidDTO objectToSend = new QuoteBidDTO(); objectToSend.QuoteID = quoteId; result = Utility.InputAmountValidation(txtAmount.Text); if (result) { objectToSend.Amount = Convert.ToDecimal(txtAmount.Text); } else { lblAmount.ForeColor = Color.Red; txtAmount.Text = ""; txtAmount.Focus(); MessageBox.Show("You should enter a positive numerical amount"); return; } result = Utility.InsertNewDataValidation(txtNotes.Text); if (result) { objectToSend.Notes = txtNotes.Text; } else { lblNotes.ForeColor = Color.Red; txtNotes.Focus(); MessageBox.Show("You should enter some information"); return; } BidService bidToCreate = new BidService(); result = bidToCreate.setNewBid(objectToSend, companyId); if (result) { MessageBox.Show("The New Bid Has Just Been Successfully Created"); this.Close(); } }