private void LoadPaymentDetail(string PaymentNo)
        {
            BusinessLayer.Common.MemberPayment objMemberPayment = new BusinessLayer.Common.MemberPayment();
            DataTable dtPayment = objMemberPayment.GetFeesHeadWisePaymentReport(PaymentNo, 0, "All", DateTime.MinValue, DateTime.MinValue, 0, 0);

            if (dtPayment != null)
            {
                lblSLNo.Text           = dtPayment.Rows[0]["SrlNo"].ToString();
                lblMemberCode.Text     = dtPayment.Rows[0]["MemberCode"].ToString();
                lblMemberName.Text     = dtPayment.Rows[0]["MemberName"].ToString();
                lblPO.Text             = dtPayment.Rows[0]["PO"].ToString();
                lblBlock.Text          = dtPayment.Rows[0]["BlockName"].ToString();
                lblDistrict.Text       = dtPayment.Rows[0]["DistrictName"].ToString();
                lblDate.Text           = Convert.ToDateTime(dtPayment.Rows[0]["PaymentDate"].ToString()).ToString("dd/MM/yyyy");
                lblPAC.Text            = "";
                lblSum.Text            = dtPayment.Rows[0]["RenewalFeesPaymentAmount"].ToString();
                lblGST.Text            = dtPayment.Rows[0]["RenewalFeesTaxPaymentAmount"].ToString();
                lblAdmissionFee.Text   = dtPayment.Rows[0]["AdmissionFeesPaymentAmount"].ToString();
                lblAdmissionGST.Text   = dtPayment.Rows[0]["AdmissionFeesTaxPaymentAmount"].ToString();
                lblDevelopmentFee.Text = dtPayment.Rows[0]["DevelopmentPaymentAmount"].ToString();
                lblTotal.Text          = dtPayment.Rows[0]["PaymentAmount"].ToString();
                lblNarration.Text      = dtPayment.Rows[0]["Narration"].ToString();
                lblChequeNo.Text       = dtPayment.Rows[0]["PaymentMode"].ToString();
            }
        }
Beispiel #2
0
        private void BindUploadList()
        {
            //dgvError.DataSource = null;
            //dgvError.DataBind();

            BusinessLayer.Common.MemberPayment objMemberPayment = new BusinessLayer.Common.MemberPayment();
            DataTable dt = objMemberPayment.GetFeesHeadWisePaymentReport("", 0, "All", DateTime.MinValue, DateTime.MinValue, 0, 0);
            DataView  dv = new DataView(dt);

            dv.RowFilter = "IsExcelUpload = 'True'";

            dtList = dv.ToTable();

            dgvPaymentReport.DataSource = dtList;
            dgvPaymentReport.DataBind();
            BindFooter();

            if (dtList.Rows.Count > 0)
            {
                btnDownload.Visible = true;
            }
            else
            {
                btnDownload.Visible = false;
            }
        }
Beispiel #3
0
        private void LoadPaymentList()
        {
            string   PaymentNo        = txtPaymentNo.Text.Trim();
            string   PaymentMode      = ddlPaymentMode.SelectedValue;
            int      CashBankLedgerId = Convert.ToInt32(ddlCashBankLedger.SelectedValue);
            int      MemberId         = Convert.ToInt32(ddlMember.SelectedValue);
            DateTime FromDate         = Convert.ToDateTime(txtFromDate.Text.Split('/')[2] + "-" + txtFromDate.Text.Split('/')[1] + "-" + txtFromDate.Text.Split('/')[0]);
            DateTime ToDate           = Convert.ToDateTime(txtToDate.Text.Split('/')[2] + "-" + txtToDate.Text.Split('/')[1] + "-" + txtToDate.Text.Split('/')[0]);
            int      BusinessTypeId   = Convert.ToInt32(ddlBusinessType.SelectedValue);

            BusinessLayer.Common.MemberPayment objMemberPayment = new BusinessLayer.Common.MemberPayment();
            DataTable dt = objMemberPayment.GetFeesHeadWisePaymentReport(PaymentNo, CashBankLedgerId, PaymentMode, FromDate, ToDate, MemberId, BusinessTypeId);
            DataView  dv = new DataView(dt);

            if (Session["UserType"].ToString().Equals("Agent"))
            {
                dv.RowFilter = "CreatedBy = " + Session["UserId"].ToString() + " AND CreatedByUserType = 'Agent'";
            }

            dt = dv.ToTable();

            decimal TotalAdmissionFees = 0, TotalAdmissionFeesTax = 0, TotalRenewalFees = 0, TotalRenewalFeesTax = 0, Total = 0, TotalDevelopmentFee = 0;

            dt.AsEnumerable().ToList().ForEach(row =>
            {
                Total += Convert.ToDecimal(row["PaymentAmount"].ToString());
                TotalAdmissionFees    += Convert.ToDecimal(row["AdmissionFeesPaymentAmount"].ToString());
                TotalRenewalFees      += Convert.ToDecimal(row["RenewalFeesPaymentAmount"].ToString());
                TotalAdmissionFeesTax += Convert.ToDecimal(row["AdmissionFeesTaxPaymentAmount"].ToString());
                TotalRenewalFeesTax   += Convert.ToDecimal(row["RenewalFeesTaxPaymentAmount"].ToString());
                TotalDevelopmentFee   += Convert.ToDecimal(row["DevelopmentPaymentAmount"].ToString());
            });


            dgvPaymentReport.DataSource = dt;
            dgvPaymentReport.DataBind();
            if (dt.Rows.Count > 0)
            {
                dgvPaymentReport.FooterRow.Cells[6].Text  = TotalAdmissionFees.ToString("F2");
                dgvPaymentReport.FooterRow.Cells[7].Text  = TotalAdmissionFeesTax.ToString("F2");
                dgvPaymentReport.FooterRow.Cells[8].Text  = TotalRenewalFees.ToString("F2");
                dgvPaymentReport.FooterRow.Cells[9].Text  = TotalRenewalFeesTax.ToString("F2");
                dgvPaymentReport.FooterRow.Cells[10].Text = TotalDevelopmentFee.ToString("F2");
                dgvPaymentReport.FooterRow.Cells[11].Text = Total.ToString("F2");

                btnDownload.Visible = true;
            }
            else
            {
                btnDownload.Visible = false;
            }
        }