Drug/Controllers/DrugClassifyController.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Model;
using WebHelper;
using DTO;
namespace Drug.Controllers
{
    public class DrugClassifyController : BaseController
    {
        //
        // GET: /DrugClassify/
        BaseService<DrugClassify> bs = new BaseService<DrugClassify>();

        public ActionResult Index()
        {
            int pagesize = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["pagesize"]);
            int rowcount = 0;

            var bookmodels = bs.QueryByPage(1, pagesize, out rowcount, c =>c.DrugCf_ID, c => true);

            double pageindexcount = (double)rowcount / pagesize;
            ViewBag.page = Math.Ceiling(pageindexcount);
            ViewBag.count = rowcount;
            return View();
        }

        public ActionResult AllDrug(string id)
        {
            try
            {
                int pageindex = int.Parse(id);
                int pagesize = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["pagesize"]);
                int rowcount = 0;
                var dcmodels = bs.QueryByPage(pageindex, pagesize, out rowcount, c => c.DrugCf_ID, c => true);

                return Json(DTOList.GetDc(dcmodels));
            }
            catch (Exception ex)
            {
                return WriteError(ex);
            }
        }

        public ActionResult AddIndex()
        {
            return View();
        }


        public ActionResult AddDep()
        {
            try
            {
                string DepName = Request.Form["DepName"];
                string PlaceName = Request.Form["PlaceName"];
                DrugClassify model = new DrugClassify();
                //BaseService<DepartmentInfo> bs = new BaseService<DepartmentInfo>();
后面还有 64 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。