コード例 #1
0
        void loadTienPhat()
        {
            string tienPhatNgay = CaiDat_DAO.LayTienPhatNgay();

            tienPhatNgayText.Text = tienPhatNgay;
            string tienPhatTrenMotTuan = CaiDat_DAO.LayTienPhatTuan();

            tienPhatTuanText.Text = tienPhatTrenMotTuan;
        }
コード例 #2
0
        private void dtpBorrowday_ValueChanged(object sender, EventArgs e)
        {
            dtpReturnday.Value = DateTime.Now;
            if (txtBorrowID.Text == "" || txtMemberID.Text == "" || lbBookID.SelectedItem.ToString() == "")
            {
                return;
            }
            int d = TraSach_DAO.getExp(txtBorrowID.Text, txtMemberID.Text, lbBookID.SelectedItem.ToString());

            if (d < 0)
            {
                txtPunish.Text = "0";
            }
            if (d >= 0 && d <= 7)
            {
                txtPunish.Text = (int.Parse(CaiDat_DAO.LayTienPhatNgay()) * d).ToString();
            }
            if (d > 7)
            {
                txtPunish.Text = (int.Parse(CaiDat_DAO.LayTienPhatTuan()) * (float)d / 7).ToString();
            }
        }