Exemplo n.º 1
0
        private void contextMenuStrip1_Click(object sender, EventArgs e)
        {
            string getBill = gridView2.GetFocusedRowCellValue("OPID").ToString();

            lblPatientID.Text = getBill;
            DAL.Model.DischargeBill patientBill = new DAL.Model.DischargeBill();
            patientBill.OPID        = getBill;
            patientBill             = new MedicalManager().GetDischargeBill_Update(patientBill);
            txtdoctorcharge.Text    = patientBill.TConsultBill;
            txtservicecharge.Text   = patientBill.ServiceCharge.ToString("f");
            lblReg.Text             = patientBill.RegNo;
            txtpathology.Text       = patientBill.PBill.ToString("f");
            txtdischargeTime.Text   = patientBill.DiscTime;
            txtdischargedate.Text   = Convert.ToDateTime(patientBill.DeisDate).ToString("d");
            lblPatientName.Text     = patientBill.PatientName;
            txtBedCharge.Text       = patientBill.TotalBedCharge;
            txtmedicaineCharge.Text = patientBill.PharmacyBill.ToString("f");
            txtOTSerivce.Text       = patientBill.OTservice.ToString("f");
            txtOTMedicine.Text      = patientBill.OTMedicine.ToString("f");
            txthospitalcharge.Text  = patientBill.HospitalCharge.ToString("f");
            txtnoofdays.Text        = patientBill.NoOfDay;
            txttotalBill.Text       = patientBill.TotalBill.ToString("f");
            txtadvancePaid.Text     = patientBill.AdvancedPayble.ToString("f");
            txtremarks.Text         = patientBill.Remarks;
            txtbill.Text            = patientBill.BillNo;
            xtraTabPage1.Show();
            specialButton1.Text = "Update";
        }
Exemplo n.º 2
0
        public void Update()
        {
            DAL.Model.DischargeBill aDischargeBill = new DAL.Model.DischargeBill();
            aDischargeBill.Date           = billDate.Value;
            aDischargeBill.BillNo         = txtbill.Text;
            aDischargeBill.OPID           = gridView2.GetFocusedRowCellValue("OPID").ToString();
            aDischargeBill.BillType       = cmbBillType.Text;
            aDischargeBill.TotalBill      = Convert.ToDouble(txttotalBill.Text);
            aDischargeBill.SubTotal       = Convert.ToDouble(txtSubTotal.Text);
            aDischargeBill.discount       = Convert.ToDouble(txtdiscount.Text);
            aDischargeBill.AdvancedPayble = Convert.ToDouble(txtadvancePaid.Text);
            aDischargeBill.NetPayble      = Convert.ToDouble(txtNetPayble.Text);
            aDischargeBill.HospitalCharge = Convert.ToDouble(txthospitalcharge.Text);
            aDischargeBill.NurseCharge    = Convert.ToDouble(txtOTSerivce.Text);
            aDischargeBill.DoctorCharge   = Convert.ToDouble(txtdoctorcharge.Text);
            aDischargeBill.RoomBedCharge  = Convert.ToDouble(txtBedCharge.Text);
            aDischargeBill.ServiceCharge  = Convert.ToDouble(txtservicecharge.Text);
            aDischargeBill.MedicalCharge  = Convert.ToDouble(txtmedicaineCharge.Text);
            aDischargeBill.PathologyBill  = Convert.ToDouble(txtpathology.Text);
            aDischargeBill.InwardText     = lblInward.Text;
            aDischargeBill.Remarks        = txtremarks.Text;
            aDischargeBill.OTService      = Convert.ToDouble(txtOTSerivce.Text);
            aDischargeBill.OTMedicin      = Convert.ToDouble(txtOTMedicine.Text);
            aDischargeBill.vat            = Convert.ToDouble(txtTax.Text);
            MessageModel message = new MessageModel();

            if (specialButton1.Text == "Update")
            {
                message = new DischargeMannager().UpdateDischargeBill(aDischargeBill);
            }
            if (message != null)
            {
                MessageBox.Show(message.MessageBody, message.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 3
0
 private void BillCalculate()
 {
     try
     {
         DAL.Model.DischargeBill patientBill = new DAL.Model.DischargeBill();
         patientBill.Tax            = Convert.ToDouble(txttaxpercent.Text);
         patientBill.discount       = Convert.ToDouble(txtdiscount.Text);
         patientBill.AdvancedPayble = Convert.ToDouble(txtadvancePaid.Text);
         patientBill.servicePercent = Convert.ToDouble(txtPrcentService.Text);
         patientBill.TotalBill      = Convert.ToDouble(txttotalBill.Text);
         //.....
         patientBill           = dischargeMannager.VateCalcule(patientBill);
         txtservicecharge.Text = patientBill.ServiceCharge.ToString("f");
         txtTax.Text           = patientBill.Tax.ToString("f");
         txtSubTotal.Text      = patientBill.SubTotal.ToString("f");
         txtNetPayble.Text     = patientBill.NetPayble.ToString("f");
         var ammount = Spell.SpellAmount.InWrods(Convert.ToDecimal(patientBill.NetPayble));
         lblInward.Text = ammount;
     }catch (Exception)
     {}
     //MessageBox.Show(ex.Message);
 }