Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for dynamically creating entity class under frame of Silverlight

A technology of dynamic creation and entity classes, applied in the direction of program control devices, etc., can solve problems such as difficult management, silverlight does not support datatable, and heavy system development workload, so as to improve work efficiency and not easy to manage

Inactive Publication Date: 2013-07-24
INSPUR COMMON SOFTWARE
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Silverlight does not support datatable, and developers usually need to define their own entity classes and convert datatables into entity classes for use on the silverlight side. This is a very heavy workload for system development and is not easy to manage

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for dynamically creating entity class under frame of Silverlight
  • Method for dynamically creating entity class under frame of Silverlight

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0014] end:

[0015] 1. First, serialize the DataTable into a string, and save the table name, column name and other information in the string string. Part of the code is as follows:

[0016] Private static string SerializeDataTable(Datatable dt, int ipIndex)

[0017] {

[0018] try

[0019] {

[0020] StringBuilder strResult = new StringBuilder()

[0021] String strTableName = "";

[0022] StrtablName=dt.TableName;

[0023] If (strTableName=="")

[0024] StrtablName="TABLENAME_"+ipIndex, ToString();

[0025] strResult.Appdend("▲");

[0026] for(int s=0:s

[0027] strResult.Appdend(dt.Columns[s].ColumnName);

[0028] 2. Encode and compress the obtained string:

[0029] Byte[]bytes=System.Text.Encoding.UTF8.GetBytes(str);

[0030] Byte[]bR=Utils. Compress(bytes);

[0031] Return System.Convert.ToBase64String(bR)

[0032] Silverlight side:

[0033] First, decode and decompress the string, and parse ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for a dynamically creating entity class under a frame of Silverlight. According to the method, a data table type sequence not supported by the Silverlight is transformed to a character string type sequence supported by the Silverlight through the method of sequence transformation at a WCF side. The method comprises the steps: (1) a data table is serialized to be a character string through a server side and transmitted to a Silverlight side through the WCF after compression; (2) the character string is decoded and uncompressed at the Silverlight side, the uncompressed character string is analyzed so that Observable Collection (dynamic) is obtained, wherein the dynamic is of a dynamic type, and data of the data table are stored through the Observable Collection (dynamic); and (3) according to analyzed information, a case is dynamically established and assigned so that transformation of the character string type sequence is achieved, and at last the transformed character string type sequence is returned to the Silverlight side for use.

Description

technical field [0001] The invention relates to the technical field of computer applications, in particular to a method for dynamically creating entity classes under the silverlight framework. Background technique [0002] DataTable is a grid virtual table that temporarily saves data, and it can be easily bound to the database without code. We know that entity tables are stored in the database, and there are a series of data in entity tables. The DataTable is a table stored in memory, and it will not affect the database until it is persisted to the database. DataTable is often used in project development. If DataTable is used properly, it can not only make the program simple and practical, but also improve performance and achieve twice the result with half the effort. DataTable also has many methods, such as: 1. Get DataTable through constructor; 2. Get DataTable through DataSet; 3. Customize the structure of DataTable through DataRow; 4. Get new DataTable through existing...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44
Inventor 马占涛
Owner INSPUR COMMON SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products