private void BtnRegistration_Click(object sender, EventArgs e) { Sell sell = new Sell(); sell.SellID = DB.Sell.GetCount() + 1; sell.SellerID = _customer.CustomerID; sell.RegistrationDate = DateTime.Now; sell.Checked = false; UsedBook usedBook = new UsedBook(); usedBook.UsedBookID = DB.UsedBook.GetCount() + 1; usedBook.MetaDataID = _metaDataBook.MetaDataBookID; usedBook.Quality = (string)cbbQuality.SelectedItem; usedBook.IsSell = false; DB.UsedBook.Insert(usedBook); DB.Sell.Insert(sell); SellUsedBook sellUsedBook = new SellUsedBook(); sellUsedBook.UsedBookID = usedBook.UsedBookID; sellUsedBook.SellID = sell.SellID; DB.SellUsedBook.Insert(sellUsedBook); Close(); }
public UsedBookForm(UsedBook usedBook) { InitializeComponent(); _usedBook = usedBook; Icon = Resources.Purchase1; }
private RowDoubleClickedEventArgs OnRowDoubleClicked(UsedBook usedBook) { RowDoubleClickedEventArgs args = new RowDoubleClickedEventArgs(usedBook); OnRowDoubleClicked(args); return(args); }
public OrderSheet(Data.Customer customer, UsedBook usedBook) { InitializeComponent(); _customer = customer; _usedBook = usedBook; Icon = Resources.Purchase1; }
private void BtnBuy_Click(object sender, EventArgs e) { UsedBook usedBook = _usedBook; OrderSheet form = new OrderSheet(_customer, usedBook); form.ShowDialog(); Close(); }
private void DgvList_DoubleClick(object sender, System.EventArgs e) { UsedBook usedBook = dgvList.CurrentRow.DataBoundItem as UsedBook; if (usedBook == null) { return; } OnRowDoubleClicked(usedBook); }
private void SellBookInfoForm_Load(object sender, EventArgs e) { usedBook = DB.Sell.SearchBook(_sell); lblTitle.Text = usedBook.Title; lblWriter.Text = usedBook.Writer; lbPublisher.Text = usedBook.Publisher; lbSeller.Text = _sell.SellerID.ToString(); lblPrice.Text = Discount.SalePrices(usedBook.Quality, usedBook.Price).ToString("C"); pcbBookImage.Image = Image.FromFile(usedBook.ImagePath); pcbBookImage.SizeMode = PictureBoxSizeMode.StretchImage; }
private void UscList_RowDoubleClicked(object sender, Controls.BuyListControl.RowDoubleClickedEventArgs e) { UsedBook usedBook = e.UsedBook; if (usedBook == null) // 형 변환 실패... { return; } UsedBookForm form = new UsedBookForm(_customer, usedBook); form.ShowDialog(); }
private void DgvList_DoubleClick(object sender, System.EventArgs e) { UsedBook usedBook = dgvList.CurrentRow.DataBoundItem as UsedBook; if (usedBook == null) { return; } // TrackForm 띄우기 OnRowDoubleClicked(usedBook); //if (usedBook.IsSell == true) // dgvList.Rows[usedBook.UsedBookID].Visible = false; }
public RowDoubleClickedEventArgs(UsedBook usedBook) { UsedBook = usedBook; }
public OrderSheet(UsedBook usedBook) { InitializeComponent(); _usedBook = usedBook; Icon = Resources.Purchase1; }
public UsedBookInfoForm(UsedBook usedBook) { InitializeComponent(); _usedBook = usedBook; Icon = Resources.Book11; }