コード例 #1
0
        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();
        }
コード例 #2
0
        public UsedBookForm(UsedBook usedBook)
        {
            InitializeComponent();

            _usedBook = usedBook;
            Icon      = Resources.Purchase1;
        }
コード例 #3
0
        private RowDoubleClickedEventArgs OnRowDoubleClicked(UsedBook usedBook)
        {
            RowDoubleClickedEventArgs args = new RowDoubleClickedEventArgs(usedBook);

            OnRowDoubleClicked(args);

            return(args);
        }
コード例 #4
0
        public OrderSheet(Data.Customer customer, UsedBook usedBook)
        {
            InitializeComponent();

            _customer = customer;
            _usedBook = usedBook;
            Icon      = Resources.Purchase1;
        }
コード例 #5
0
        private void BtnBuy_Click(object sender, EventArgs e)
        {
            UsedBook usedBook = _usedBook;

            OrderSheet form = new OrderSheet(_customer, usedBook);

            form.ShowDialog();
            Close();
        }
コード例 #6
0
        private void DgvList_DoubleClick(object sender, System.EventArgs e)
        {
            UsedBook usedBook = dgvList.CurrentRow.DataBoundItem as UsedBook;

            if (usedBook == null)
            {
                return;
            }

            OnRowDoubleClicked(usedBook);
        }
コード例 #7
0
        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;
        }
コード例 #8
0
        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();
        }
コード例 #9
0
        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;
        }
コード例 #10
0
 public RowDoubleClickedEventArgs(UsedBook usedBook)
 {
     UsedBook = usedBook;
 }
コード例 #11
0
 public OrderSheet(UsedBook usedBook)
 {
     InitializeComponent(); _usedBook = usedBook;
     Icon = Resources.Purchase1;
 }
コード例 #12
0
 public UsedBookInfoForm(UsedBook usedBook)
 {
     InitializeComponent();
     _usedBook = usedBook;
     Icon      = Resources.Book11;
 }