Exemple #1
0
        /// <summary>
        /// 转换成字符串
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0}{1}", BillItemID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", BillID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", Subject.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrSubject, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", SubjectType.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", Amount.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", DueAmt.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", ReceivedAmt.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", PenaltyIntAmt.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);

            if (FullPaidTime.HasValue)
            {
                sb.AppendFormat("{0}{1}", FullPaidTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), WebServiceConst.Separater_1);
            }
            else
            {
                sb.AppendFormat("{0}{1}", "", WebServiceConst.Separater_1);
            }

            sb.AppendFormat("{0}{1}", OperatorID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", IsCurrent.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", IsShelve.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", BusinessID.ToString(), WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrAmount, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrDueAmt, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrReceivedAmt, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrReceived, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", StrReceivable, WebServiceConst.Separater_1);
            sb.AppendFormat("{0}{1}", Display, WebServiceConst.Separater_1);
            sb.Append(StrCreateTime);

            return(sb.ToString());
        }
Exemple #2
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            OpBal     = 0;
            BillAmt   = 0;
            BillTax   = 0;
            PaidAmt   = 0;
            PaidTax   = 0;
            DueAmt    = 0;
            TaxDueAmt = 0;
            TotalBill = 0;
            TotalPaid = 0;
            TotalDue  = 0;

            BusinessLayer.Common.SemFeesGeneration ObjSemFees = new BusinessLayer.Common.SemFeesGeneration();
            Entity.Common.SemFeesGeneration        SemFees    = new Entity.Common.SemFeesGeneration();

            if (txtFromDate.Text == "")
            {
                SemFees.FromDate = null;
            }
            else
            {
                SemFees.FromDate = Convert.ToDateTime(txtFromDate.Text);
            }

            if (txtToDate.Text == "")
            {
                SemFees.ToDate = null;
            }
            else
            {
                SemFees.ToDate = Convert.ToDateTime(txtToDate.Text);
            }

            SemFees.MembershipCategoryId = int.Parse(ddlMembershipCategory.SelectedValue.Trim());
            SemFees.BlockId    = int.Parse(ddlBlock.SelectedValue.Trim());
            SemFees.DistrictId = int.Parse(ddlDistrict.SelectedValue.Trim());
            SemFees.StateId    = int.Parse(ddlState.SelectedValue.Trim());
            SemFees.Month      = ""; // (ddlSubscriptionMonth.SelectedIndex == 0) ? string.Empty : ddlSubscriptionMonth.SelectedValue.Trim();
            SemFees.Year       = 0;  // (ddlSubscriptionYear.SelectedIndex == 0) ? 0 : int.Parse(ddlSubscriptionYear.SelectedValue.Trim());
            SemFees.FeesHeadId = int.Parse(ddlFeesHead.SelectedValue.Trim());

            DataTable dt = ObjSemFees.GetConsolidated_StudentOutstandingReport(SemFees);

            if (dt != null)
            {
                dgvBill.DataSource = dt;
                dgvBill.DataBind();
            }

            if (dt.Rows.Count > 0)
            {
                btnDownload.Visible = true;
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotOpBalAmt")).Text   = "<b>" + OpBal.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotBillAmt")).Text    = "<b>" + BillAmt.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotTaxBillAmt")).Text = "<b>" + BillTax.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotPaidAmt")).Text    = "<b>" + PaidAmt.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotTaxPaidAmt")).Text = "<b>" + PaidTax.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotDueAmt")).Text     = "<b>" + DueAmt.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotTaxDueAmt")).Text  = "<b>" + TaxDueAmt.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotalBill")).Text     = "<b>" + TotalBill.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotalPaid")).Text     = "<b>" + TotalPaid.ToString("#0.00") + "</b>";
                ((Literal)dgvBill.FooterRow.FindControl("ltrTotalDue")).Text      = "<b>" + TotalDue.ToString("#0.00") + "</b>";
            }
            else
            {
                btnDownload.Visible = false;
            }
        }