示例#1
0
        public ActionResult Edit(string PID)
        {
            Model.Content.Builds          builds = BD.GetModelById("PID", PID);
            List <Model.Content.BDetails> bdt    = Details.GetModelsByValue("SELECT * FROM BDetails where isdel=0 and pid='" + PID + "'", null);

            ViewBag.Details = bdt;
            return(View(builds));
        }
示例#2
0
        public ActionResult GetCustomer()
        {
            int               pageindex  = int.Parse(Request["PageIndex"]);
            int               pagesize   = int.Parse(Request["PageSize"]);
            string            sqlcount   = "select id from Customers ";
            List <Customeres> builds     = CT.GetModelsByValue("select ROW_NUMBER() OVER(ORDER BY Customers.ID DESC) AS rank,Customers.Name,Customers.Phone,Customers.Time,Builds.Name as xiaoqu from Customers left join Builds on Customers.FID=Builds.PID ", "");
            var               totalCount = CT.GetModelsByValue(sqlcount, null);

            return(Json(new { list = builds, RowCount = totalCount.Count(), PageIndex = pageindex, PageCount = (int)Math.Ceiling(totalCount.Count() * 1.0 / 10) }, JsonRequestBehavior.DenyGet));
        }
示例#3
0
        public ActionResult Detail(string PID)
        {
            Model.Content.Builds          builds = BDs.GetModelByValue("select top 1* from Builds  where isdel=0 and  pid='" + PID + "'", null);
            List <Model.Content.BDetails> bdt    = Details.GetModelsByValue("SELECT * FROM BDetails where isdel=0 and pid='" + PID + "'", null);

            ViewBag.Details = bdt;
            return(View(builds));
        }
示例#4
0
        /// <summary>
        /// 网站首页
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            string      sql   = " select top 4 builds.PID,builds.Name,builds.Address, bdetails.Urls from Builds left join BDetails on Builds.PID=BDetails.PID where BDetails.Type=0 and Builds.IsDel=0 and bdetails.isdel=0";
            List <Main> mains = BD.GetModelsByValue(sql, null);

            ViewBag.Main = mains;
            return(View());
        }
示例#5
0
        public ActionResult GetList()
        {
            int    pageindex = int.Parse(Request["PageIndex"]);
            int    pagesize  = int.Parse(Request["PageSize"]);
            string sqlcount  = "select id from builds ";
            // = _baseExtensionB.GetModelsByValue(sqlstr, param);
            //多产品操作信息
            QueryM queryM = new QueryM()
            {
                PageNum  = pageindex,
                PageSize = pagesize,
                Where    = "",
                Params   = null
            };
            List <Model.Content.Builds> builds = BD.GetListAsync(queryM);
            var totalCount = BD.GetModelsByValue(sqlcount, null);

            return(Json(new { list = builds, RowCount = totalCount.Count(), PageIndex = pageindex, PageCount = (int)Math.Ceiling(totalCount.Count() * 1.0 / 10) }, JsonRequestBehavior.DenyGet));
        }