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

            DAL.Model.DischargeBillNICU patientBill = new DAL.Model.DischargeBillNICU();
            patientBill.OPID           = getBill;
            patientBill                = new NICUBillManager().GetDischargeBillNICU(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        = "B/O" + " " + 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");
            gridControlNICU.DataSource = patientBill.PatientBill;
            Totalcaluclation(gridView3, "Total", txttotalBill);
        }
Exemplo n.º 2
0
        public void Save()
        {
            DAL.Model.DischargeBillNICU aDischargeBill      = new DAL.Model.DischargeBillNICU();
            List <DischargeBillNICU>    aDischargeBillNicus = new List <DischargeBillNICU>();

            aDischargeBill.Date           = billDate.Value;
            aDischargeBill.BillNo         = txtbill.Text;
            aDischargeBill.OPID           = gridView1.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);

            for (int i = 0; i < gridView3.RowCount; i++)
            {
                DAL.Model.DischargeBillNICU aDischargeBills = new DAL.Model.DischargeBillNICU(); aDischargeBills.BillNo = txtbill.Text;
                aDischargeBills.ServiceId     = gridView3.GetRowCellValue(i, gridView3.Columns["ServiceId"]).ToString();
                aDischargeBills.ServiceName   = gridView3.GetRowCellValue(i, gridView3.Columns["Particulars"]).ToString();
                aDischargeBills.ServiceStatus = gridView3.GetRowCellValue(i, gridView3.Columns["Status"]).ToString();
                aDischargeBills.Total         = Convert.ToDecimal(gridView3.GetRowCellValue(i, gridView3.Columns["Total"]));
                aDischargeBills.RegNo         = lblReg.Text;
                aDischargeBillNicus.Add(aDischargeBills);
            }
            MessageModel message = new NICUBillManager().SaveDischargeBill(aDischargeBill, aDischargeBillNicus);

            if (message != null)
            {
                MessageBox.Show(message.MessageBody, message.MessageTitle, MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
        }
Exemplo n.º 3
0
 private void BillCalculate()
 {
     try
     {
         DAL.Model.DischargeBillNICU patientBill = new DAL.Model.DischargeBillNICU();
         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           = NICUBillManager.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);
 }