public string StatisticalData()
        {
            //此方法是初始化图表中的x轴数据返回的是数组类型的数据
            OrderForm order = new OrderForm();

            return(PMPublicFuncs.ListToJson(order.LiDemandDay()));
        }
        public string GetOpName()
        {
            DataTable temptable = StatisticalModels.GetProductOutPut(0, string.Empty);
            //获取工序名称

            List <string> op = new List <string>();

            foreach (DataRow item in temptable.Rows)
            {
                if (!op.Contains(item["opName"].ToString()))
                {
                    op.Add(item["opName"].ToString());
                }
                else
                {
                    continue;
                }
            }
            StatisticalModels.OpName = PMPublicFuncs.ListToJson(op);
            return(StatisticalModels.OpName);
        }
示例#3
0
        /// <summary>
        /// 获取导航栏的数据
        /// </summary>
        /// <returns></returns>
        public static string StrNavName()
        {
            List <string> groupList = new List <string>();
            SqlCommand    cmd       = PMCommand.SchCmd();

            cmd.CommandText = "SELECT distinct viewname FROM View_PmViewGroup where SYSID ='" + PMStaticModels.UserModels.PMUser.UserSysID + "' and vglobal = 'export'";
            SqlDataReader rd = cmd.ExecuteReader();

            while (rd.Read())
            {
                groupList.Add(rd[0].ToString());
            }
            rd.Close();
            if (groupList.Count == 0)
            {
                cmd.CommandText = "SELECT distinct viewname FROM View_PmViewGroup where SYSID ='" + PMStaticModels.UserModels.PMUser.UserSysID + "'";
                rd = cmd.ExecuteReader();
                while (rd.Read())
                {
                    groupList.Add(rd[0].ToString());
                }
                rd.Close();
                if (groupList.Count == 0)
                {
                    return("没有为设备创建视图");
                }
                else
                {
                    return(PMPublicFuncs.ListToJson(groupList));
                }
            }
            else
            {
                return(PMPublicFuncs.ListToJson(groupList));
            }
        }
示例#4
0
 public string FunctionResult()
 {
     return(PMPublicFuncs.ListToJson(PMUser.FunctionList));
 }