Esempio n. 1
0
        protected void MemberDevelopmentDetails()
        {
            BusinessLayer.Common.MemberFeesConfig objFeesConfig = new BusinessLayer.Common.MemberFeesConfig();
            DataTable dt = objFeesConfig.MemberDevelopmentFeeGetAll(Convert.ToInt32(ddlMember.SelectedValue));

            dgvDevelopmentFee.DataSource = dt;
            dgvDevelopmentFee.DataBind();
        }
        protected void LoadBillDetails()
        {
            BusinessLayer.Common.MemberFeesConfig objMemberBill = new BusinessLayer.Common.MemberFeesConfig();
            DataSet   ds             = objMemberBill.MemberDevelopmentFeeAllMonthGetAll(MemberId, FinYrId, FromMonth, ToMonth, WithOutOpening);
            DataTable dt             = ds.Tables[0]; //Member Details
            DataTable dtBill         = ds.Tables[1]; //Bill Details
            decimal   OpeningBalance = decimal.Parse(ds.Tables[2].Rows[0]["OpeningBalance"].ToString());

            lblOpeningBalance.Text = OpeningBalance.ToString();
            DataTable dtPaid = ds.Tables[3]; //Paid or Not

            // ** Populate Member Details
            lblMemberName.Text = (dt.Rows[0]["MemberName"] == DBNull.Value ? "" : dt.Rows[0]["MemberName"].ToString());
            lblAddress.Text    = (dt.Rows[0]["VillageOrStreet"] == DBNull.Value ? "" : dt.Rows[0]["VillageOrStreet"].ToString().ToUpper()) + "</br>"
                                 + (dt.Rows[0]["DistrictName"] == DBNull.Value ? "" : dt.Rows[0]["DistrictName"].ToString().ToUpper()) + ", " + (dt.Rows[0]["PIN"] == DBNull.Value ? "" : dt.Rows[0]["PIN"].ToString().ToUpper());
            lblMemberCode.Text = dt.Rows[0]["MemberCode"] == DBNull.Value ? "" : dt.Rows[0]["MemberCode"].ToString().ToUpper();
            if (dtBill != null)
            {
                int count = dtBill.Rows.Count;
                lblBillNo.Text   = ((dtBill.Rows[0]["BillNo"] == DBNull.Value) ? "" : dtBill.Rows[0]["BillNo"].ToString().ToUpper()) + " - " + ((dtBill.Rows[count - 1]["BillNo"] == DBNull.Value) ? "" : dtBill.Rows[count - 1]["BillNo"].ToString().ToUpper());
                lblBillDate.Text = DateTime.Parse(dtBill.Rows[0]["MonthlyRenewalDate"].ToString()).ToString("dd/MM/yyyy") + " - " + DateTime.Parse(dtBill.Rows[count - 1]["MonthlyRenewalDate"].ToString()).ToString("dd/MM/yyyy");

                //lblGSTNo.Text = dt.Rows[0]["GSTNo"] == DBNull.Value ? "" : dt.Rows[0]["GSTNo"].ToString().ToUpper();
                string MonthlyRate = "";
                //MonthlyRate=dt.Rows[0]["FinalAmount"].ToString().ToUpper();
                decimal total = 0;
                for (int k = 0; k < dtBill.Rows.Count; k++)
                {
                    lblMonth.Text       += dtBill.Rows[k]["MonthName"].ToString().ToUpper() + ", " + dtBill.Rows[k]["YearNo"].ToString().ToUpper() + "</br></br>";
                    lblFinalAmount.Text += ((dtBill.Rows[k]["FinalAmount"] == DBNull.Value) ? "0.00" : dtBill.Rows[k]["FinalAmount"].ToString().ToUpper()) + "</br></br>";
                    total       += (dtBill.Rows[k]["FinalAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtBill.Rows[k]["FinalAmount"]);
                    MonthlyRate += "</br></br>";
                }
                decimal TotalAmount = (OpeningBalance + total);
                //if (dtPaid != null && dtPaid.Rows.Count > 0)  //from here
                //{
                //    MonthlyRate += "Development Fees Paid";
                //    for (int c = 0; c < dtPaid.Rows.Count; c++)
                //    {
                //        lblMonth.Text += "On " + DateTime.Parse(dtPaid.Rows[c]["PaymentDate"].ToString()).ToString("dd/MM/yyyy") + " (" + dtPaid.Rows[c]["PaymentNo"] + ")</br></br>";
                //        lblFinalAmount.Text += dtPaid.Rows[c]["PaymentAmount"].ToString() + "</br></br>";
                //        TotalAmount -= (dtPaid.Rows[c]["PaymentAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtPaid.Rows[c]["PaymentAmount"]);
                //    }
                //}  //till here ,closed as per the request of Hironmoy
                lblMonthlyRate.Text += MonthlyRate;
                lblTotal.Text        = TotalAmount == 0 ? "0.00" : TotalAmount.ToString(".00");
                lblTotalInWords.Text = ConvertNumbertoWords(Convert.ToInt32(TotalAmount)) + " ONLY";
            }
        }
Esempio n. 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            BusinessLayer.Common.MemberFeesConfig objFeesConfig = new BusinessLayer.Common.MemberFeesConfig();
            Entity.Common.MemberFeesConfig        FeesConfig    = new Entity.Common.MemberFeesConfig();
            FeesConfig.MemberId = Convert.ToInt32(ddlMember.SelectedValue);

            string strFeesXml = "<NewDataSet>";

            foreach (GridViewRow gvr in dgvFeesHead.Rows)
            {
                if (gvr.RowType == DataControlRowType.DataRow)
                {
                    TextBox txtAmount = (TextBox)gvr.FindControl("txtAmount");
                    strFeesXml += "<Row";
                    strFeesXml += " FeesHeadId = \"" + dgvFeesHead.DataKeys[gvr.RowIndex].Value.ToString() + "\"";
                    strFeesXml += " Amount = \"" + (string.IsNullOrEmpty(txtAmount.Text.Trim()) ? "0" : txtAmount.Text.Trim()) + "\"";
                    strFeesXml += " />";
                }
            }
            strFeesXml        += "</NewDataSet>";
            FeesConfig.FeesXml = strFeesXml;

            string strParticularsXml = "<NewDataSet>";

            foreach (GridViewRow gvr in dgvDevelopmentFee.Rows)
            {
                if (gvr.RowType == DataControlRowType.DataRow)
                {
                    TextBox txtCapacity  = (TextBox)gvr.FindControl("txtCapacity");
                    TextBox txtFee       = (TextBox)gvr.FindControl("txtFee");
                    TextBox txtNarration = (TextBox)gvr.FindControl("txtNarration");

                    strParticularsXml += "<Row";
                    strParticularsXml += " ParticularsId = \"" + dgvDevelopmentFee.DataKeys[gvr.RowIndex].Values[1].ToString() + "\"";
                    strParticularsXml += " Capacity = \"" + (string.IsNullOrEmpty(txtCapacity.Text.Trim()) ? "0" : txtCapacity.Text.Trim()) + "\"";
                    strParticularsXml += " FeeAmount = \"" + (string.IsNullOrEmpty(txtFee.Text.Trim()) ? "0" : txtFee.Text.Trim()) + "\"";
                    strParticularsXml += " Narration = \"" + txtNarration.Text.Trim().Replace("'", "''") + "\"";
                    strParticularsXml += " />";
                }
            }
            strParticularsXml        += "</NewDataSet>";
            FeesConfig.ParticularsXml = strParticularsXml;

            objFeesConfig.Save(FeesConfig);
            LoadFeesDetails();
            Message.IsSuccess = true;
            Message.Text      = "Fees Saved Successfully";
            Message.Show      = true;
        }
        private void LoadDevelopmentFeeList()
        {
            BusinessLayer.Common.MemberFeesConfig objMember = new BusinessLayer.Common.MemberFeesConfig();
            DataSet   ds = objMember.MemberDevelopmentFeeAllMonthGetAll(MemberId, FinYrId, FromMonth, ToMonth, 0);
            DataTable dt = ds.Tables[1];

            if (dt.Rows.Count > 0)
            {
                dgvMemberDevelopmentFee.DataSource = dt;
                dgvMemberDevelopmentFee.DataBind();
                btnDownload.Visible = true;
                btnDownload_WithOutOpening.Visible = true;
            }
            else
            {
                btnDownload.Visible = false;
            }
        }
Esempio n. 5
0
        protected void LoadFeesDetails()
        {
            MemberDevelopmentDetails();

            BusinessLayer.Common.MemberFeesConfig objFeesConfig = new BusinessLayer.Common.MemberFeesConfig();
            DataTable dt = objFeesConfig.GetAll(Convert.ToInt32(ddlMember.SelectedValue));

            dgvFeesHead.DataSource = dt;
            dgvFeesHead.DataBind();

            if (dt.Rows.Count > 0)
            {
                btnSave.Visible = true;
            }
            else
            {
                btnSave.Visible = false;
            }
        }
Esempio n. 6
0
        private void LoadRenewalFeeList()
        {
            MemberId  = Convert.ToInt32(ddlMember.SelectedValue);
            FinYrId   = Convert.ToInt32(Session["FinYrID"]);
            FromMonth = Convert.ToInt32(ddlFromMonth.SelectedValue);
            ToMonth   = Convert.ToInt32(ddlToMonth.SelectedValue);
            BusinessLayer.Common.MemberFeesConfig objMember = new BusinessLayer.Common.MemberFeesConfig();
            DataSet   ds = objMember.MemberRenewalFeeGetAll(MemberId, FinYrId, FromMonth, ToMonth, 0);
            DataTable dt = ds.Tables[1];

            if (dt.Rows.Count > 0)
            {
                dgvMemberRenewalFee.DataSource = dt;
                dgvMemberRenewalFee.DataBind();
                btnDownload.Visible = true;
                btnDownload_WithOutOpening.Visible = true;
            }
            else
            {
                btnDownload.Visible = false;
            }
        }
Esempio n. 7
0
        protected void LoadBillDetails()
        {
            BusinessLayer.Common.MemberFeesConfig objMember = new BusinessLayer.Common.MemberFeesConfig();
            DataSet   ds     = objMember.MemberRenewalFeeGetAll(MemberId, FinYrId, FromMonth, ToMonth, WithOutOpening);
            DataTable dt     = ds.Tables[0]; //Member Details
            DataTable dtBill = ds.Tables[1]; // Bill Details Month Wise

            lblOpeningBalance.Text = ds.Tables[2].Rows[0]["OpeningBalance"].ToString();
            //lblOpeningTax.Text = ds.Tables[1].Rows[0]["OpeningBalanceTax"].ToString();
            decimal   OpeningTotal = decimal.Parse(ds.Tables[2].Rows[0]["OpeningBalance"].ToString());
            DataTable dtPaid       = ds.Tables[3];

            //** Populate Member Details
            lblMemberName.Text = (dt.Rows[0]["MemberName"] == DBNull.Value ? "" : dt.Rows[0]["MemberName"].ToString());
            lblAddress.Text    = (dt.Rows[0]["VillageOrStreet"] == DBNull.Value ? "" : dt.Rows[0]["VillageOrStreet"].ToString().ToUpper()) + "</br>"
                                 + (dt.Rows[0]["DistrictName"] == DBNull.Value ? "" : dt.Rows[0]["DistrictName"].ToString().ToUpper()) + ", " + (dt.Rows[0]["PIN"] == DBNull.Value ? "" : dt.Rows[0]["PIN"].ToString().ToUpper());
            lblMemberCode.Text = dt.Rows[0]["MemberCode"] == DBNull.Value ? "" : dt.Rows[0]["MemberCode"].ToString().ToUpper();
            lblGSTNo.Text      = dt.Rows[0]["GSTNo"] == DBNull.Value ? "" : dt.Rows[0]["GSTNo"].ToString().ToUpper();


            if (dtBill.Rows.Count > 0)
            {
                int count = dtBill.Rows.Count;
                lblBillNo.Text   = ((dtBill.Rows[0]["BillNo"] == DBNull.Value) ? "" : dtBill.Rows[0]["BillNo"].ToString().ToUpper()) + " - " + ((dtBill.Rows[count - 1]["BillNo"] == DBNull.Value) ? "" : dtBill.Rows[count - 1]["BillNo"].ToString().ToUpper());
                lblBillDate.Text = DateTime.Parse(dtBill.Rows[0]["MonthlyRenewalDate"].ToString()).ToString("dd/MM/yyyy") + " - " + DateTime.Parse(dtBill.Rows[count - 1]["MonthlyRenewalDate"].ToString()).ToString("dd/MM/yyyy");
                decimal Rate1       = (dtBill.Rows[0]["FinalAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtBill.Rows[0]["FinalAmount"]);
                string  MonthlyRate = "";
                decimal total       = 0;
                for (int k = 0; k < dtBill.Rows.Count; k++)
                {
                    lblMonth.Text += dtBill.Rows[k]["MonthName"].ToString().ToUpper() + ", " + dtBill.Rows[k]["YearNo"] + "</br></br>";
                    decimal Rate2 = (dtBill.Rows[k]["FinalAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtBill.Rows[k]["FinalAmount"]);
                    if ((Rate2 != Rate1) || (k == 0))
                    {
                        if (k != 0)
                        {
                            MonthlyRate += "Monthly Subscription / Renewal fees @ Rs " + Rate2 + "</br></br>";
                        }
                        else
                        {
                            MonthlyRate += (Rate2 == 0 ? "0.00" : Rate2.ToString()) + "</br></br>";
                        }
                        Rate1 = Rate2;
                    }
                    else
                    {
                        MonthlyRate += "</br></br>";
                    }
                    lblFinalAmount.Text += ((dtBill.Rows[k]["FinalAmount"] == DBNull.Value) ? "0.00" : dtBill.Rows[k]["FinalAmount"]) + "</br></br>";
                    total += (dtBill.Rows[k]["FinalAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtBill.Rows[k]["FinalAmount"]);
                }
                decimal TotalAmount = (OpeningTotal + total);
                //if (dtPaid != null && dtPaid.Rows.Count > 0)  from here
                //{
                //    MonthlyRate += "Membership Renewal Fees Paid";
                //    for (int c = 0; c < dtPaid.Rows.Count; c++)
                //    {
                //        lblMonth.Text += "On " + DateTime.Parse(dtPaid.Rows[c]["PaymentDate"].ToString()).ToString("dd/MM/yyyy") + " (" + dtPaid.Rows[c]["PaymentNo"] + ")</br></br>";
                //        lblFinalAmount.Text += dtPaid.Rows[c]["PaymentAmount"].ToString() + "</br></br>";
                //        TotalAmount -= (dtPaid.Rows[c]["PaymentAmount"] == DBNull.Value) ? 0 : Convert.ToDecimal(dtPaid.Rows[c]["PaymentAmount"]);
                //    }
                //}
                lblMonthlyRate.Text += MonthlyRate;  //till here ,removed as per the request by hironmoy

                //decimal TotalTax = ((TotalAmount * 18) / 100);
                //lblServiceTax.Text = TotalTax == 0 ? "0.00" : TotalTax.ToString(".00");
                //lblTotalAmount.Text = (TotalAmount + TotalTax) == 0 ? "0.00" : (TotalAmount + TotalTax).ToString(".00");
                //lblTotalInWords.Text = ConvertNumbertoWords(Convert.ToInt32(TotalAmount + TotalTax)) + " ONLY";

                lblTotalAmount.Text  = TotalAmount == 0 ? "0.00" : TotalAmount.ToString(".00");
                lblTotalInWords.Text = ConvertNumbertoWords(Convert.ToInt32(TotalAmount)) + " ONLY";
            }
        }