コード例 #1
0
        private void btnPaid_Click(object sender, EventArgs e)
        {
            MeterBill mb = new MeterBill();

            BindMeterBillEntity(mb);
            if (meterBillCalculateservices.UpdateMeterBill(mb))
            {
                if (rdoadvancemoney.Checked)
                {
                    AdvanceMoneyCustomer amc = new AdvanceMoneyCustomer();
                    BindAdvanceMoneyCustomerEntity(amc);
                    if (advanceMoneyCustomerServices.SaveAdvanceMoney(amc))
                    {
                    }
                }    //end of Advance Money save
                if (Convert.ToDecimal(txtpunishment.Text) > 0)
                {
                    PunishmentCustomer pc = new PunishmentCustomer();
                    BindPunishmentCustomerEntity(pc);
                    if (punishmentCutomerServices.Save(pc))
                    {
                    }    //end of Punishment Customer function save
                }
                MessageBox.Show("Payment is Complete Successfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }    //end of meter bill payment paid
        }
コード例 #2
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     try {
         MeterBill mb = new MeterBill();
         mb.MeterBillID        = vm.MeterBillID;
         mb.MeterBillCode      = vm.MeterBillCode;
         mb.InvoiceDate        = vm.InvoiceDate;
         mb.LastBillPaidDate   = vm.LastBillPaidDate;
         mb.ServicesFees       = Convert.ToDecimal(txtServiceFees.Text);
         mb.MeterFees          = Convert.ToDecimal(txtMeterFees.Text);
         mb.StreetLightFees    = Convert.ToDecimal(txtStreetLightFees.Text);
         mb.TotalFees          = Convert.ToDecimal(txtTotalFees.Text);
         mb.UsageUnit          = vm.UsageUnit;
         mb.CurrentMonthUnit   = vm.CurrentMonthUnit;
         mb.PreviousMonthUnit  = vm.PreviousMonthUnit;
         mb.isPaid             = vm.isPaid;
         mb.Remark             = vm.Remark;
         mb.RecivedAmount      = vm.RecivedAmount;
         mb.HorsePowerFees     = Convert.ToDecimal(txtHorsePowerFees.Text);
         mb.AdditionalFees1    = Convert.ToDecimal(txtAdditionalFees1.Text);
         mb.AdditionalFees2    = Convert.ToDecimal(txtAdditionalFees2.Text);
         mb.AdditionalFees3    = Convert.ToDecimal(txtAdditionalFees3.Text);
         mb.MeterUnitCollectID = vm.MeterUnitCollectID;
         mb.Active             = true;
         mb.CreatedDate        = vm.CreatedDate;
         mb.CreatedUserID      = vm.CreatedUserID;
         mterBillCalculateServices.UpdateMeterBill(mb);
         MessageBox.Show("Meter bill record is updated successfully.", "information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (Exception ex) {
         MessageBox.Show("Error occur" + ex.Message);
     }
 }