somesogoood

Thursday, February 19, 2009

this is I send help message to EF 3.5 SUPPORTER

Hi,
I use EF 3.5.
When I submited the forms, after the forms textbox display the old input information.

I want to implement when I submited the forms, it display the new forms wait for input new information to the forms.

How to implement this.

thank you.

Post the mail to EF 3.5 team

I receive your mail and you say
"Please be advised that Enterprise Forms does support AJAX calls in form submissions provided non-ajax fields are not used within the form. The only non-ajax type fields are Rich Text Editor and Field Upload. If your form does not use any of the fields mentioned above during form submission only the form module is updated and not the complete page.

"

I think that " The only non-ajax type fields are Rich Text Editor and Field Upload"

may be "file upload", isn't it?

and another question I want to know:

Because Report of EF 3.5 (that I was using just now) not support Chinese report filed name, it display like that "amp26469amp30005amp20869amp234". It's not we wanted.

so, we will develop report function from the data source(from EF table).

but, we only know the form template is one template make one table. don't know the workflow state map that where is the table and column. we want to know accepted or rejected state where can find the state from data table? where the column name? and If you have some better idea/advice, please tell us.

thanks very much.

Henry Hua

Enterprise Forms report field can't use Chinese

Enterprise Forms report field can't use Chinese,
When display the report field name, it's display like that "amp26469amp30005amp20869amp234", letter and number complex.

How to make the Enterprise Forms(DNN MODULE) 's Child Forms

child forms enterprise forms

How to make the Enterprise Forms(DNN MODULE) 's Child Forms

I can't find the article about child forms.

and for different role, should be different form to display .

If you fond it, or I found it , will reply this at comment.

Wednesday, February 18, 2009

the error of "client actions enterprise forms".

I find the error of "client actions enterprise forms".
if in EnterPrise forms 3.5 , If I use client actions on textfield, the preview and the form is bug.

I sovle it , it's that input "OnBlurAction = alert('Hello World')" all the sentence, that's ok now.

GridView custom control that contains how to Export to Excel

GridView custom control that contains how to Export to Excel
We often use GridView Export to Excel functionality, I also have some articles prior to the introduction to do.

Today I was asked, if the template Girdview out using a custom control, then how to deal with when exported?

For example, the custom control contains a DROPDOWNLIST and three Label controls, which used to display data on the page is one of the Label control, the question now is, if not PrepareControlForExport () in the custom control to handle, then Export The Excel files used in the corresponding GridView custom control out of the contents of all the same (DROPDOWNLIST controls for the first Item), but the custom control to handle the case, do not know how to remove it in order to correct the value ( used to display the label of the value), trying to not be able to custom control into Dropdowlist and Label in any of, but the mandatory conversion if the statement will run error.

We first look at the GridView Export to Excel and open source chart tools mentioned in the development of export tools, source files can be downloaded here: Export GridView to Excel

In GridViewExportUtil.cs, the function PrepareControlForExport are like this:


/ / /
/ / / Replace any of the contained controls with literals
/ / /
/ / /
private static void PrepareControlForExport (Control control)
(
for (int i = 0; i
(
Control current = control.Controls [i];
if (current is LinkButton)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, new LiteralControl ((current as LinkButton). Text));
)
else if (current is ImageButton)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, new LiteralControl ((current as ImageButton). AlternateText));
)
else if (current is HyperLink)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, new LiteralControl ((current as HyperLink). Text));
)
else if (current is DropDownList)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, new LiteralControl ((current as DropDownList). SelectedItem.Text));
)
else if (current is CheckBox)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, new LiteralControl ((current as CheckBox). Checked? "True": "False"));
)

if (current.HasControls ())
(
GridViewExportUtil.PrepareControlForExport (current);
)
)
)




This section of code is introduced to control traversal of all sub-control, for each sub-control, in accordance with sub-type of control to generate a LiteralControl, and with this son LiteralControl to replace the current control. For LinkBtton, use it to replace the text, for ImagaButton, are using it to replace the Alternate Text. Function against the LinkButton, ImageButton, HyperLink, DropDwonList, CheckBox to do a deal, if the current control is not any one of which, it has to determine whether sub-control, and recursive calls.

Back to the question before us, if there is a GridView custom control, then how do we do? In fact, the solution on the original idea to be able to determine are not custom control, use this custom control in one way or another in a hope to export the text information read out, converted to a Literal control can be.

We can write a function to deal with such a comparison is complicated, the model code is as follows:

else if (current is MyWebController)
(
control.Controls.Remove (current);
control.Controls.AddAt (i, GetLiteralController (current));
)

GetLiteralControler As for the wording, you can custom control traversal of all sub-controls, according to the characteristics of control, such as location, ID select a control, converted to Literal controls and back.

This article is an essay, recorded about ideas, not the actual test, if the question, please also pointed out that the U.S. gradually enriched.

Tuesday, February 17, 2009

study DNN module that Enterprise Forms 3.5

I feel it was so complex first.
but study a day, then feel it's so sample.

find the problem, Enterprise Forms 3.5 is not availability some times. like I click the return link.

any problem have you find?

Monday, February 16, 2009

Sql 2005 express about remote access and the sa password problem

Sql 2005 express about remote access and the sa password problem 
sqlserver2005 version now more, have express version, there are enterprises such as the development of version, I used to express the current version, 
Occupied system resources, or very little, unlike the Internet said, one is running the development version, it ate more than 400 M memory, the great majority of our 
Most people, in order to take a look at sqlserver2005 new features, there is no need no formal Developer Edition installed, Express version of the small, and it 
The function of the individual spent enough. 
       Bahrain sqlserver2005 (Express version), in order to manage, you need to manage to go to the next manager, Microsoft's official website has 
Under the Manager manage installed after the procedure to connect sqlserver2005, are the following points should be noted. 
       1. Sql2005 to open remote connection features, open approach is as follows, 
            Configuration tools -> sql server configurator external applications -> services and applications connected to the external configuration device -> open the MSSQLSERVER node under the Database Engine node, the first optional "remote connection", to take over the proposed choice of "At the same time the use of TCP / IP and named pipes ", are identified, restart the database service it. 
       2. Landing settings changed, Sql server and windows Authentication mode is selected at the same time, the specific settings are as follows: 
          manage manager -> windows Authentication (the first time the way into windows), -> Object Explorer, select your database server - right-> properties> security> Sql server and windows Authentication mode is selected at the same time. 
       3: Sql server to set up a way the user name and password, the specific settings are as follows: 
     manage manager -> windows Authentication> new query> sp_password null, 'sa123456', 'sa' 
     This will set up a user name is sa, password: sa123456 of users, the next landing, you can use Sql server mode 
User name is sa, password: sa123456 users into a database. 
      4: After finishing the above steps, this Writing connection string can be a smooth entry into the database, 
         (server =. \ \ sqlexpress; uid = sa; pwd = sa123456; database = master ";

interface and abstract class distinction

Surface questions: interface and abstract class distinction 
One difference between the two not the same as the concept of expression. Abstract class is a class of things a high degree of polymerization, then the succession of abstract class for the subclass, the abstract class for example, are "yes" relationship; and the interface is the definition of a code of conduct, so for the realization of the sub-class interface for , compared with the interface is "act in accordance with the interfaces required to complete." 

Distinction between two types of abstract class in the definition of methods, they can give way to the realization of some, it may not give; As for the interface is defined by the method which can give some realize. 

Distinction between three categories of succession for the two involved in the realization of Ways are different. Class inheritance is defined for abstract class abstract methods, can be rewritten, that is to say, you can use abstract class extension of the method; interface for the definition of class methods or properties, in the inherited class must give the corresponding realize the methods and properties. 

The difference between the four, in the abstract category, add a method, then inherit class can not make any deal with; As for interface, it necessary to amend the succession of categories, providing a new definition of the method. 

Give the following easy comparison between the two forms. 

  
Interface 
Abstract class 
Multiple inheritance 
Support 
Do not support 
Type restrictions 
No 
Has only reference types are 
Ways to achieve 
Types of succession must give way to realize 
Class inheritance can not give 
Scalability 
Is too much trouble 
Relatively flexible 
Multi-inheritance 
Is too much trouble to use virtual function required 
More flexible




==
c # interface and abstract class distinction 
  U.S. will easily confuse these two, I also like listening to the teacher's design patterns Chien-Chung Lee, he is also old the abstract class as interface, I get even more confused, so to find some online information. 
       First, abstract categories: 
       Abstract class is a special category, but can not be instantiated; In addition, with other properties; important is abstract class may include abstract methods, this is not the ordinary type. Abstract methods can only be a statement in the abstract class and does not contain any realize, derived class must cover them. In addition, the abstract class can be derived from an abstract class, you can override the base class abstract method can also be not covered, if not cover, then its derived class must cover them. 

        Second, interface: 
       Interfaces are reference types, similar to categories, and the similarities between abstract class has three points: 
        One can not be instantiated; 
        2, including the method statement did not realize; 
        3, derived classes must realize unrealized methods are abstract methods of abstract class, interface is all the members (not only methods, including other members); 

        In addition, the interface has the following characteristics: 
Besides interface can contain methods, but also can contain attributes, index, and events, and these members are defined as public domain. In addition, should not contain any other members, such as: constant domain, constructor, destructor, static members. A class can directly inherit multiple interfaces, but only directly inherit a class (including the abstract class). 


       Three abstract classes and interfaces of the distinction: 
       1. Class is an abstract object can be understood as the abstract class type as an object into an abstract class is called abstract class. The interface is just a behavior or require Microsoft custom interface is always able to bring the word after paragraph, to demonstrate that their statements are a class of type "I can do more 。。。". abstract class are defined in a series of closely related categories, and the interface is the relationship between the majority of osteoporosis but to achieve a particular function category . 
       2. Interface basically does not have any specific features of the succession, it is merely a commitment to be able to call the method; 
       3. A class can realize a number of interfaces, but only the expansion of a parent class 
       4. Interface can be used to support the callback, but the succession did not have this feature. 
       5. Abstract class can not be sealed. 
       6. Abstract class to achieve the specific method defaults to false, but realize interface class interface methods are by default non-virtual, of course, you can also virtual declaration. 
       7. (Interface) with a similar non-abstract class, abstract class must also be in kind of the base class list of interfaces available to all members of its own to achieve. However, the permit will interface methods of abstract class is mapped to abstract methods. 
       8. Oop abstract class implements a principle of variable separation and can not be changed. Abstract class and interface is defined as immutable, and the variable sub-class seat to be realized. 
       9. Good interface should be defined is a specific functionality, rather than multi-function, otherwise the pollution caused by interface. If a category is only realize the interface of a function of the interface had to go to achieve the other methods, called interface pollution. 
      10. As far as possible avoid the use of inheritance to achieve the formation of functional, but the use of black-box reuse, that is the target portfolio. Because an increase in the level of inheritance, resulting in the most direct consequence is that when you call this group in a certain category, it is necessary to them all loaded into the stack! Consequences can be imagined. (Combination of understanding the principle of stack). At the same time, concerned friends have noticed that Microsoft can build a category, they often use a combination of methods of the object. For example, asp.net Medium, Page Class, Server Request has attributes such as, but in fact they are the object of a certain category. Page class used this object to call the other type of methods and properties, this is a very basic design principles. 
      11. If the abstract class realize interface, the interface methods can be mapped to the abstract class as abstract methods without having to realize, and in the abstract class to achieve the sub-class interface methods. 
    
       Fourth, abstract class and interface use: 
       1. If the component is expected to create multiple versions, then the creation of abstract class. Abstract class to provide easy ways to control the component version. 
       2. If the function will be to create a wide range of wide differences between the use of objects, use the interface. If you want to design small and concise functional blocks, use the interface. 
       3. If you want to design a large functional unit, then use the abstract class. If you want to realize in all the components which provide common functions have been achieved, then the use of abstract class. 
       4. Abstract class used to close the object; and interface suitable for non-related category provide a common function. 


  The following is what I have seen a few online image analogy, really good, huh, huh: 
1. The aircraft fly, birds fly, they inherit the same interface "Fly"; but F22 aircraft belonging to an abstract class, abstract class pigeons are birds. 
2. Just like the wooden doors are iron gate door (abstract class), you want a door I can not (can not be instantiated), but I can give you a concrete steel doors or wooden doors (many states); and only are able to Door, you should not say it is a window (single inheritance); a door can be locked (interface) can also have doorbell (many realize). Door (abstract class) defines what you are, interface (lock) provides what you can do (an interface can only be the best thing to do, you can not ask the lock can also sound bar (interface pollution)).