Beispiel #1
0
        static void Main(string[] args)
        {
            int i = 0;

            dDateHour = DateTime.Now;
            IFile   iFile   = new BL_File();
            IReport iReport = new BL_Report();

            InitValues();
            dtInformation = iFile.GetTable();
            while (i <= intHours)
            {
                dDateHour = dDateHour.AddHours(-1 * i);
                string sUrlDownload = GetUrlDownload();
                string sPathFile    = GetPathFile();
                if (iFile.DownloadFile(sUrlDownload, sPathFile))
                {
                    if (iFile.UnzipFile(sPathFile))
                    {
                        DataTable dtAux = iFile.LoadInformation(sPathFile.Substring(0, sPathFile.Length - 3), dDateHour);
                        if (dtAux != null)
                        {
                            dtInformation.Merge(dtAux);
                            i++;
                        }
                    }
                }
            }
            iReport.LangDomainViewCount(dtInformation);
            Console.ReadLine();
            iReport.PageTileCountodView(dtInformation);
            Console.ReadLine();
        }
        public JsonResult GetReportMISMonthlyConsultancyCharges(DateTime FromDate, DateTime ToDate, string PatientType, string DoctorID)
        {
            DataSet dsPatientBillNo = new DataSet();
            List <MISReportMonthlyConsultancyCharges> searchlist = new List <MISReportMonthlyConsultancyCharges>();

            BL_Report objBL = new BL_Report();
            var       Cat   = "";


            if (DoctorID == "0")
            {
                Cat = "%";
            }
            else
            {
                Cat = Convert.ToInt32(DoctorID).ToString();
            }
            dsPatientBillNo = objBL.GetReportMISMonthlyConsultancyCharges(FromDate, ToDate, PatientType, Cat);
            var PaidAmt = Convert.ToString(dsPatientBillNo.Tables[0].Compute("Sum(PaidAmount)", String.Empty));

            var BillAmt = Convert.ToString(dsPatientBillNo.Tables[0].Compute("Sum(BillAmount)", String.Empty));

            if (dsPatientBillNo.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in dsPatientBillNo.Tables[0].Rows)
                {
                    searchlist.Add(new MISReportMonthlyConsultancyCharges
                    {
                        Regno           = dr["RegNo"].ToString(),
                        PatientName     = dr["PatientName"].ToString(),
                        PatientType     = dr["PatientType"].ToString(),
                        DoctorPrintName = dr["DoctorPrintName"].ToString(),
                        BillDate        = dr["BillDate"].ToString(),
                        BillAmount      = dr["BillAmount"].ToString(),
                        ConsAmt         = dr["ConsAmt"].ToString(),
                        Discount        = dr["Discount"].ToString(),
                        PaidAmount      = dr["PaidAmount"].ToString(),
                        PaidAmt         = PaidAmt,
                        BillAmt         = BillAmt
                    });
                }
            }
            Session["ReportMISMonthlyConsultancyCharges"] = dsPatientBillNo;
            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult GetAllConsultantDr(string prefix)
        {
            BL_Report obj = new BL_Report();
            List <MISReportMonthlyConsultancyCharges> searchlist = new List <MISReportMonthlyConsultancyCharges>();
            DataSet ds = obj.GetAllConsultantDr();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new MISReportMonthlyConsultancyCharges
                {
                    DoctorID   = dr["DoctorID"].ToString(),
                    DoctorName = dr["DoctorName"].ToString()
                });
            }


            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult GetAllProblem(string prefix)
        {
            BL_Report obj = new BL_Report();
            List <MISGovernmentRecordReport> searchlist = new List <MISGovernmentRecordReport>();
            DataSet ds = obj.GetAllProblem();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new MISGovernmentRecordReport
                {
                    ProblemID = dr["ProblemID"].ToString(),
                    Problem   = dr["Problem"].ToString()
                });
            }


            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult GetAllOpinionBy(string prefix)
        {
            BL_Report obj = new BL_Report();
            List <MISGovernmentRecordReport> searchlist = new List <MISGovernmentRecordReport>();
            DataSet ds = obj.GetAllOpinionBy(prefix);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new MISGovernmentRecordReport
                {
                    DoctorID        = dr["DoctorID"].ToString(),
                    DoctorPrintName = dr["DoctorPrintName"].ToString()
                });
            }


            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult GetReportRptMISGovernmentRecords(DateTime FromDate, DateTime ToDate, string PatientType, string ProblemID, string OpinionID, string PerformedID)
        {
            DataSet dsPatientBillNo = new DataSet();
            List <MISGovernmentRecordReport> searchlist = new List <MISGovernmentRecordReport>();

            BL_Report objBL = new BL_Report();
            var       type  = "";
            var       Opn   = "";
            var       Pro   = "";
            var       Per   = "";

            if (PatientType == "All")
            {
                type = "%";
            }
            else
            {
                type = Convert.ToInt32(PatientType).ToString();
            }
            if (ProblemID == "0")
            {
                Pro = "%";
            }
            else
            {
                Pro = Convert.ToInt32(ProblemID).ToString();
            }
            if (PerformedID == "0")
            {
                Per = "%";
            }
            else
            {
                Per = Convert.ToInt32(PerformedID).ToString();
            }
            if (OpinionID == "0")
            {
                Opn = "%";
            }
            else
            {
                Opn = Convert.ToInt32(OpinionID).ToString();
            }
            dsPatientBillNo = objBL.RptMISGovernmentRecords(FromDate, ToDate, type, Pro, Opn, Per);

            if (dsPatientBillNo.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in dsPatientBillNo.Tables[0].Rows)
                {
                    searchlist.Add(new MISGovernmentRecordReport
                    {
                        PatientRegNo            = dr["PatientRegNo"].ToString(),
                        PatientName             = dr["PatientName"].ToString(),
                        GuardianName            = dr["GuardianName"].ToString(),
                        Problem                 = dr["Problem"].ToString(),
                        OPDIPDID                = dr["OPDIPDID"].ToString(),
                        Gender                  = dr["Gender"].ToString(),
                        Age                     = dr["Age"].ToString(),
                        PatientType             = dr["PatientType"].ToString(),
                        MaritalStatus           = dr["MaritalStatus"].ToString(),
                        ReligionName            = dr["ReligionName"].ToString(),
                        IndicationOfTermination = dr["IndicationOfTermination"].ToString(),
                        Duration                = dr["Duration"].ToString(),
                        Remark                  = dr["Remark"].ToString(),
                        OpinionBy               = dr["OpinionBy"].ToString(),
                        PerformedBy             = dr["PerformedBy"].ToString(),
                        AddmissionDate          = dr["AddmissionDate"].ToString(),
                        DischargeDate           = dr["DischargeDate"].ToString(),
                        Address                 = dr["Address"].ToString(),
                    });
                }
            }
            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }