Exemplo n.º 1
0
        public static string select()
        {
            string    sql    = "select * from mg_DelJet_SEQNR ";
            DataTable table  = SqlHelper.GetDataDataTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);
            string    result = JSONTools.DataTableToJSON(table);

            return(result);
        }
Exemplo n.º 2
0
        void st()   //查询工位
        {
            JavaScriptSerializer s       = new JavaScriptSerializer();
            HttpRequest          request = HttpContext.Current.Request;
            string fl_id = request.Params["fl_id"];
            string sql   = "select distinct a.st_no,a.st_id from mg_station a LEFT JOIN View_mg_sys_log b ON a.st_no=b.st_no  where  a.fl_id='" + fl_id + "' and len(b.AngleResult) > 0 order by a.st_no";

            DataTable ResTable = SqlHelper.GetDataDataTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);

            if (ResTable == null)
            {
                string json = JSONTools.ObjectToJSON("");
                Response.Write(json);
                Response.End();
            }
            else
            {
                string json = JSONTools.DataTableToJSON(ResTable);
                Response.Write(json);
                Response.End();
            }
        }
Exemplo n.º 3
0
        void fl()   //查询流水线
        {
            JavaScriptSerializer s       = new JavaScriptSerializer();
            HttpRequest          request = HttpContext.Current.Request;
            string sql = "select fl_id, fl_name from dbo.mg_FlowLine order by fl_name";

            DataTable ResTable3 = SqlHelper.GetDataDataTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);

            //string json = FunCommon.DataTableToJson(ResTable1);
            if (ResTable3 == null)
            {
                string json = JSONTools.ObjectToJSON("");
                Response.Write(json);
                Response.End();
            }
            else
            {
                string json = JSONTools.DataTableToJSON(ResTable3);
                Response.Write(json);
                Response.End();
            }
        }
Exemplo n.º 4
0
        void part() //查询部件号
        {
            JavaScriptSerializer s       = new JavaScriptSerializer();
            HttpRequest          request = HttpContext.Current.Request;
            string fl_id = request.Params["fl_id"];
            string st_id = request.Params["st_id"];
            string sql   = "select distinct part_no from View_mg_sys_log where fl_id='" + fl_id + "' and st_id='" + st_id + "'";

            DataTable ResTable = SqlHelper.GetDataDataTable(SqlHelper.SqlConnString, CommandType.Text, sql, null);

            if (ResTable == null)
            {
                string json = JSONTools.ObjectToJSON("");
                Response.Write(json);
                Response.End();
            }
            else
            {
                string json = JSONTools.DataTableToJSON(ResTable);
                Response.Write(json);
                Response.End();
            }
        }