コード例 #1
0
        public ActionResult Index()

        {
            Pathology_dbEntities1 db = new Pathology_dbEntities1();

            return(View(db.TBL_R_DEPT));
        }
コード例 #2
0
 public ActionResult GetLOAD()
 {
     using (Pathology_dbEntities1 db = new Pathology_dbEntities1())
     {
         List <VIEW_LAB> empList = db.VIEW_LAB.ToList <VIEW_LAB>();
         return(Json(new { data = empList }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #3
0
 public ActionResult GetData()
 {
     using (Pathology_dbEntities1 db = new Pathology_dbEntities1())
     {
         List <View_Visit> empList = db.View_Visit.ToList <View_Visit>();
         return(Json(new { data = empList }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #4
0
        public ActionResult Entry_Proc()
        {
            Pathology_dbEntities1 db = new Pathology_dbEntities1();

            ViewBag.PANEL       = new SelectList(db.TBL_R_PANEL, "PANEL_ID", "PANEL_NAME");
            ViewBag.consultants = new SelectList(db.TBL_PAY_MAST, "EMP_CODE", "EMP_NAME");
            ViewBag.gendr       = new SelectList(db.TBL_Gender, "G_id", "G_name");
            return(View());
        }
コード例 #5
0
 public ActionResult TechData()
 {
     using (Pathology_dbEntities1 db = new Pathology_dbEntities1())
     {
         List <TBL_MPROC_DETAIL> empList = db.TBL_MPROC_DETAIL.ToList <TBL_MPROC_DETAIL>();
         //return Json(new { data = empList }, JsonRequestBehavior.AllowGet);
         return(View(empList));
     }
 }
コード例 #6
0
        public ActionResult reporting()
        {
            int    sub  = 36;
            string id   = ".pdf";
            var    lr   = new LocalReport();
            String path = Path.Combine(Server.MapPath("~/Report"), "ProSlip.rdlc");

            if (System.IO.File.Exists(path))
            {
                lr.ReportPath = path;
            }
            else
            {
                return(View("index"));
            }
            List <Procedure_slip> att = new List <Procedure_slip>();

            using (Pathology_dbEntities1 entities = new Pathology_dbEntities1())
            {
                att = entities.Procedure_slip.Where(a => a.mp_code == sub).ToList();
            }
            ReportDataSource rds = new ReportDataSource("DataSet1", att);

            lr.DataSources.Add(rds);
            string reporttype = id;
            string minetype;
            string encoding;
            string filenameextension = id;
            string deviceinfo        =
                "<DeviceInfo>" +
                "<OutputFormat>DD</OutputFormat>" +
                "<PageWidth>8.5in</PageWidth>" +
                "<PageHeight>11in</PageHeight>" +
                "<MarginTop>0.5in</MarginTop>" +
                "<MarginLeft>11in</MarginLeft>" +
                "<MarginRight>11in</MarginRight>" +
                "<MarginBottom>0.5in</MarginBottom>" +
                "</DeviceInfo>";

            Warning[] warning;
            string[]  stream;
            byte[]    renderedbytes;
            renderedbytes = lr.Render("pdf", deviceinfo, out minetype, out encoding, out filenameextension, out stream, out warning);

            return(File(renderedbytes, minetype));
        }
コード例 #7
0
        public JsonResult InsertCustomers(List <TBL_MPROC_DETAIL> customers)
        {
            using (Pathology_dbEntities1 db = new Pathology_dbEntities1())
            {
                TBL_MASTER_PROCEDURE mp = new TBL_MASTER_PROCEDURE();
                //Truncate Table to delete all old records.
                db.Database.ExecuteSqlCommand("TRUNCATE TABLE [TBL_MPROC_DETAIL]");
                //Check for NULL.
                if (customers == null)
                {
                    customers = new List <TBL_MPROC_DETAIL>();
                }

                //Loop and insert records.
                foreach (TBL_MPROC_DETAIL customer in customers)
                {
                    db.TBL_MPROC_DETAIL.Add(customer);
                }
                int insertedRecords = db.SaveChanges();
                return(Json(insertedRecords));
            }
        }