Beispiel #1
0
 //Inserts LateReturns to Datagridview
 private void BtnLateReturn_Click(object sender, EventArgs e)
 {
     DgvAllOrders.Rows.Clear();
     FillLateOrders();
     GrbReportRange.Hide();
     GrpSearch.Hide();
     BtnReturn.Visible = true;
     PnlPaymentInfo.Hide();
 }
Beispiel #2
0
 private void BtnOrder_Click(object sender, EventArgs e)
 {
     DgvAllOrders.Rows.Clear();
     FillAllOrders();
     GrpSearch.Hide();
     GrbReportRange.Show();
     BtnNewOrder.Hide();
     BtnReturn.Hide();
     PnlPaymentInfo.Hide();
 }
Beispiel #3
0
 // Inserts AllReturns to Datagridview
 private void BtnAllReturns_Click(object sender, EventArgs e)
 {
     PnlNewOrder.Visible  = false;
     PnlAllOrders.Visible = true;
     DgvAllOrders.Rows.Clear();
     FillPassiveOrders();
     BtnReturn.Visible = false;
     GrpSearch.Hide();
     GrbReportRange.Hide();
     PnlPaymentInfo.Hide();
 }
Beispiel #4
0
        // Return book
        private void BtnReturn_Click_1(object sender, EventArgs e)
        {
            if (_selectedOrder == null)
            {
                MessageBox.Show("Please select order to return", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            decimal Percent    = 0.005M;
            int     CurrentDay = Convert.ToInt32(DateTime.Today.ToString("dd"));

            decimal FinePrice = _selectedOrder.Price * (CurrentDay - _selectedOrder.Deadline.Day) * Percent;


            if ((CurrentDay - _selectedOrder.Deadline.Day) <= 0)
            {
                FinePrice = 0;
            }
            RtbFinePrice.Text = FinePrice.ToString();

            PnlPaymentInfo.Show();
        }
Beispiel #5
0
 private void BtnCancelReturn_Click(object sender, EventArgs e)
 {
     _selectedOrder = null;
     PnlPaymentInfo.Hide();
 }