Ejemplo n.º 1
0
        public ActionResult GetOpdFormById(string opdId, string mode)
        {
            var allRecWithOpd = OpdService.GetOpdByIdWithRows(opdId);

            if (mode == "recreate")
            {
                allRecWithOpd.Opd.VisitNo    = allRecWithOpd.Records.Count + 1;
                allRecWithOpd.Opd.DoctorId   = "0";
                allRecWithOpd.Opd.Discount   = 0;
                allRecWithOpd.Opd.DiscountBy = " ";
                allRecWithOpd.Opd.DocFee     = 0;
                allRecWithOpd.Opd.DateTime   = DateTime.Now.ToLongTimeString();
                allRecWithOpd.Opd.Id         = 0;
            }
            var dataModel = new OpdPageModel
            {
                CreatedOpdForm = allRecWithOpd?.Opd,
                Mode           = mode,
                DoctorList     = DocService.GetAllDocsForDd(),
                Records        = allRecWithOpd?.Records
            };

            //recreate
            return(View("OpdpForms", dataModel));
        }
Ejemplo n.º 2
0
        public ActionResult OpdpForms()
        {
            var dataModel = new OpdPageModel
            {
                DoctorList     = DocService.GetAllDocsForDd(),
                CreatedOpdForm = new AppOpd
                {
                    DateTime     = " ",
                    VisitNo      = 1,
                    PatientNo    = " ",
                    Name         = " ",
                    GuardianName = " ",
                    CNIC         = " ",
                    Address      = " ",
                    Phone        = " ",
                    InsuranceNo  = " "
                },
                Mode = "new"
            };

            return(View(dataModel));
        }