Ejemplo n.º 1
0
        private void btnM3_check_Click(object sender, EventArgs e)
        {
            try
            {
                int    memID = (string.IsNullOrEmpty(txtMF_memID.Text) ? 0 : int.Parse(txtMF_memID.Text));
                string nic   = txtmfNIC.Text.ToString();
                txtMFee_name.Text.ToString();

                Buisness_Logic.feeRepository fr = new Buisness_Logic.feeRepository();

                DataTable dt = fr.search_aerobic_fee(memID, nic);

                if (dt.Rows.Count > 0)
                {
                    txtMF_memID.Text         = dt.Rows[0]["memberID"].ToString();
                    txtMFee_name.Text        = dt.Rows[0]["name"].ToString();
                    txtmfNIC.Text            = dt.Rows[0]["nic"].ToString();;
                    txtMF_lastValidDate.Text = dt.Rows[0]["valde_date"].ToString();
                    txtlstPaidDate.Text      = dt.Rows[0]["recentPayment_date"].ToString();
                    txtLastpaidtime.Text     = dt.Rows[0]["recentPayment_time"].ToString();
                    txtMF_amount.Text        = dt.Rows[0]["recentPayment"].ToString();
                    txtfservice.Text         = dt.Rows[0]["service"].ToString();
                }
            }
            catch (Exception ff)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        private void btnMF_addfee_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtMF_memID.Text))
            {
                MessageBox.Show("Please search payment details of a member first.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                Buisness_Logic.fee fee1 = new Buisness_Logic.fee();

                fee1.paymentPlan = txtMF_payPlan.Text;
                // fee1.LastPaid_amount = double.Parse(txtMFnewpayemnt.Text);
                fee1.service = "Gym";
                fee1.lastVPaymentDate = txtMF_lastValidDate.Text;
                fee1.memberID = int.Parse(txtMF_memID.Text);





                Buisness_Logic.feeRepository fr = new Buisness_Logic.feeRepository();
                if (fr.addFee(fee1, transporter))
                {
                    txtMFnewpayemnt.Text = fee1.newAmount.ToString();
                    txtPaidDate.Text = fee1.paidDate;
                    txtPaidTIme.Text = fee1.paidTime;
                    txtPaymentValidfor.Text = fee1.PaymentvalidDate;



                    MessageBox.Show("Payment Updated", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Ejemplo n.º 3
0
        private void btnmfCalcPayment_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(txtMF_memID.Text) || string.IsNullOrWhiteSpace(txtmfNIC.Text))
            {
                MessageBox.Show("Please search payment details of a member first.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                Buisness_Logic.fee fee2 = new Buisness_Logic.fee();

                fee2.service          = txtfservice.Text;
                fee2.lastVPaymentDate = txtMF_lastValidDate.Text;
                fee2.memberID         = int.Parse(txtMF_memID.Text);

                Buisness_Logic.feeRepository fr = new Buisness_Logic.feeRepository();
                // fr.paymentCalculation(fee2, transporter);


                txtMFnewpayemnt.Text    = fee2.newAmount.ToString();
                txtPaymentValidfor.Text = fee2.PaymentvalidDate;
            }
        }
Ejemplo n.º 4
0
        private void bntMem4_checkPp_Click(object sender, EventArgs e)
        {

            try
            {
                Buisness_Logic.feeRepository fr = new Buisness_Logic.feeRepository();

                dataGridPayementPending.DataSource = fr.getPaymentPendingList();
                //dataGridPayementPending.dataB






            }
            catch (Exception ert)
            {

                throw;
            }
        }
Ejemplo n.º 5
0
        private void fsdfsdf_Click(object sender, EventArgs e)
        {
            Buisness_Logic.feeRepository fr = new Buisness_Logic.feeRepository();

            var i = fr.search_aerobic_fee_for_data_grid();
        }
Ejemplo n.º 6
0
        private Buisness_Logic.gymMember checKFeeUI()
        {
            Buisness_Logic.gymMember gmf = new Buisness_Logic.gymMember();
            try
            {
                if (validateFeedatils())
                {


                    Buisness_Logic.feeRepository frfee = new Buisness_Logic.feeRepository();
                    gmf.MemberID = (string.IsNullOrEmpty(txtMF_memID.Text) ? 0 : int.Parse(txtMF_memID.Text));
                    gmf.nic = txtmfNIC.Text.ToString();
                    gmf.name = txtMFee_name.Text.ToString();


                    bool req1 = frfee.searchMemberDerailsFor_fee(gmf);




                    Buisness_Logic.fee ft = new Buisness_Logic.fee();

                    ft.memberID = gmf.MemberID;
                    //gmf.MemberID = int.Parse(txtMF_memID.Text);
                    //gmf.nic = txtmfNIC.Text;
                    //gmf.name = txtMFee_name.Text;





                    bool req2 = frfee.checkPaymentDetails(ft);
                    if (gmf.MemberID == 0)
                    {
                        clearFee();
                    }
                    else
                    {
                        txtMF_memID.Text = gmf.MemberID.ToString();
                        txtMFee_name.Text = gmf.name;
                        txtmfNIC.Text = gmf.nic;
                        txtMF_payPlan.Text = gmf.paymentPlan;

                    }
                    txtMF_lastValidDate.Text = ft.lastVPaymentDate;
                    txtlstPaidDate.Text = ft.lastPaidDate;
                    txtLastpaidtime.Text = ft.lastPaidTime;
                    txtMF_amount.Text = ft.LastPaid_amount.ToString();
                    txtfservice.Text = ft.service;
                    if (req1 == true && req2 == true)
                    {
                        MessageBox.Show("payment record found.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else if (req1 == true && req2 == false)
                    {

                        txtMF_amount.Text = "";
                        txtMF_lastValidDate.Text = "";
                        txtfservice.Text = "";
                        txtlstPaidDate.Text = "";
                        txtLastpaidtime.Text = "";
                        MessageBox.Show("Member information found. But no payment record found.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    }
                    else
                    {
                        MessageBox.Show("No memeber information found by that Member ID", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                        clearFee();

                    }

                }





            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw;
            }
            return gmf;
        }