コード例 #1
0
        public ActionResult CollectStatJson_Server()
        {
            var WHC_StartDteFreeze = Request["WHC_StratDteFreeze"].ToDateTime();
            var WHC_EndDteFreeze   = Request["WHC_EndDteFreeze"].ToDateTime();
            var fuji         = Request["WHC_Fuji"];
            var Text         = Request["WHC_Text"];
            var Strlevel     = Request["WHC_Treelevel"];
            var ParentText   = Request["WHC_TreePrentText"];
            var customerinfo = new Customer()
            {
                NvcName  = Request["WHC_NvcName"] ?? "",
                VcMobile = Request["WHC_VcMobile"] ?? "",
            };
            var custno = Request["WHC_IntCustNo"] ?? "0";

            customerinfo.IntNo = custno.ToIntOrZero();

            if (Strlevel == "1")
            {
                customerinfo.NvcVillage = "所有小区";
            }
            ;
            if (Strlevel == "2")
            {
                customerinfo.NvcVillage = Text;
            }
            if (Strlevel == "3")
            {
                customerinfo.NvcVillage = fuji;
                customerinfo.VcBuilding = Text;
            }
            if (Strlevel == "4")
            {
                customerinfo.NvcVillage = ParentText;
                customerinfo.VcBuilding = fuji;
                customerinfo.VcUnitNum  = Text;
            }
            //调用后台服务获取集中器信息
            var dts = new ServiceDbClient().CollectStatus_Qry(endcode, customerinfo, WHC_StartDteFreeze, WHC_EndDteFreeze);

            int rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            int page = Request["page"] == null ? 1 : int.Parse(Request["page"]);

            DataTable dat = new DataTable();

            //复制源的架构和约束
            dat = dts.Clone();
            // 清除目标的所有数据
            dat.Clear();
            //对数据进行分页
            for (int i = (page - 1) * rows; i < page * rows && i < dts.Rows.Count; i++)
            {
                dat.ImportRow(dts.Rows[i]);
            }
            //最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
            int total  = dts.Rows.Count;
            var result = new { total = total, rows = dat };

            return(ToJsonContentDate(result));
        }
コード例 #2
0
        /// <summary>
        /// 查询参数信息
        /// </summary>
        /// <returns></returns>
        public ActionResult Param_MeterConfig_Qry()
        {
            var endcoed = Session["EndCode"] ?? "";
            var dts     = new ServiceDbClient().Param_MeterConfig_Qry(endcoed.ToString().ToInt());

            int rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            int page = Request["page"] == null ? 1 : int.Parse(Request["page"]);

            DataTable dat = new DataTable();

            //复制源的架构和约束
            dat = dts.Clone();
            // 清除目标的所有数据
            dat.Clear();
            //对数据进行分页
            for (int i = (page - 1) * rows; i < page * rows && i < dts.Rows.Count; i++)
            {
                dat.ImportRow(dts.Rows[i]);
            }
            //最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
            int total  = dts.Rows.Count;
            var result = new { total = total, rows = dat };

            return(ToJsonContentDate(result));
        }
コード例 #3
0
        public ActionResult ListJson_Server()
        {
            var Strlevel   = Request["WHC_Treelevel"];
            var fuji       = Request["WHC_Fuji"];
            var Text       = Request["WHC_Text"];
            var ParentText = Request["WHC_TreePrentText"];
            var QryCondi   = new MeterReplaceQryCondition()
            {
                NvcName     = Request["WHC_NvcName"] ?? "",
                NvcAddr     = Request["WHC_NvcAddr"] ?? "",
                IntCustNo   = (Request["IntCustNO"] ?? "0").ToString().ToIntOrZero(),
                VcMeterAddr = Request["WHC_VcAddr"] ?? ""
            };

            if (Strlevel == "1")
            {
                QryCondi.NvcVillage = "所有小区";
            }
            ;
            if (Strlevel == "2")
            {
                QryCondi.NvcVillage = Text;
            }
            if (Strlevel == "3")
            {
                QryCondi.NvcVillage = fuji;
                QryCondi.VcBuilding = Text;
            }
            if (Strlevel == "4")
            {
                QryCondi.NvcVillage = ParentText;
                QryCondi.VcBuilding = fuji;
                QryCondi.VcUnitNum  = Text;
            }

            QryCondi.IntEndNo = endcode;

            var dts = new ServiceDbClient().GetMeterReplaceList(QryCondi);

            int rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            int page = Request["page"] == null ? 1 : int.Parse(Request["page"]);

            DataTable dat = new DataTable();

            //复制源的架构和约束
            dat = dts.Clone();
            // 清除目标的所有数据
            dat.Clear();
            //对数据进行分页
            for (int i = (page - 1) * rows; i < page * rows && i < dts.Rows.Count; i++)
            {
                dat.ImportRow(dts.Rows[i]);
            }
            //最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
            int total  = dts.Rows.Count;
            var result = new { total = total, rows = dat };

            return(ToJsonContentDate(result));
        }
コード例 #4
0
        //柜台冲正数据
        public ActionResult CounterReverseDataByIntCustNo_Server()
        {
            var       custno = Request["WHC_IntCustNo"] ?? "0";
            var       dts    = new ServiceDbClient().Account_GetWriteoffByCustNo(endcode, custno.ToIntOrZero());
            int       rows   = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            int       page   = Request["page"] == null ? 1 : int.Parse(Request["page"]);
            DataTable dat    = new DataTable();

            //复制源的架构和约束
            dat = dts.Clone();
            // 清除目标的所有数据
            dat.Clear();
            //对数据进行分页
            for (int i = (page - 1) * rows; i < page * rows && i < dts.Rows.Count; i++)
            {
                dat.ImportRow(dts.Rows[i]);
            }
            //最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
            int total  = dts.Rows.Count;
            var result = new { total, rows = dat };

            return(ToJsonContentDate(result));
        }
コード例 #5
0
        public ActionResult Account_CalcFee_Qry_Server()
        {
            var Strlevel   = Request["WHC_Treelevel"];
            var fuji       = Request["WHC_Fuji"];
            var Text       = Request["WHC_Text"];
            var ParentText = Request["WHC_TreePrentText"];
            var flag       = Request["WHC_IntFlag"];
            var condi      = new AccCalcQryCondition()
            {
                NvcName = Request["WHC_NvcName"] ?? "",
                IntNo   = (Request["WHC_IntNo"] ?? "").ToString().ToIntOrZero(),
                IntFlag = flag.ToIntOrZero(),
                DtFee   = Request["WHC_DtDate"].ToDateTime()
            };

            if (Strlevel == "1")
            {
                condi.NvcVillage = "所有小区";
            }
            ;

            if (Strlevel == "2")
            {
                condi.NvcVillage = Text;
            }

            if (Strlevel == "3")
            {
                condi.NvcVillage = fuji;
                condi.VcBuilding = Text;
            }

            if (Strlevel == "4")
            {
                condi.NvcVillage = ParentText;
                condi.VcBuilding = fuji;
                condi.VcUnitNum  = Text;
            }

            condi.IntEndCode = endcode.ToString().ToIntOrZero();
            var dts = new ServiceDbClient().Account_CalcFee_Qry(condi);
            //分页参数
            int rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]);
            int page = Request["page"] == null ? 1 : int.Parse(Request["page"]);

            DataTable dat = new DataTable();

            //复制源的架构和约束
            dat = dts.Clone();
            // 清除目标的所有数据
            dat.Clear();
            //对数据进行分页
            for (int i = (page - 1) * rows; i < page * rows && i < dts.Rows.Count; i++)
            {
                dat.ImportRow(dts.Rows[i]);
            }
            //最重要的是在后台取数据放在json中要添加个参数total来存放数据的总行数,如果没有这个参数则不能分页
            int total  = dts.Rows.Count;
            var result = new { total, rows = dat };

            return(ToJsonContentDate(result));
        }