|
Codegeni-Documentation |
| GENERAL: (To be followed for all styles of codegeni) |
Below image shows the Introduction page of our codegeni. |
|
|
Below Screeshot shows the User Information. Here we have to specify the database name,SQL Server name, User name, Password. Where we have our backend tables created. |
|
|
For the tables created in back end we are going to create user interfaces and middle tier classes. Below screenshot is the style selection screen. Here we can choose which style of user interface we want. |
|
|
| Master - Normal Style: |
This is the sample script for Master - Normal Style Design. You have to do the design for all your Master - Normal Style forms.
Drop Table PostMst |
First, assume we choosen Master - Normal Style. Once we selected the style we will be shown the table selection screen. Here we have to choose the tables for whom we need to create the user interface and class modules in the selected style. We have associate a icon for each table selected. This icon will be used in respective user interface screens (In list view image). We can do this by double clicking on the tables. |
|
|
Below Screenshot shows the Interface Information. Al l the tables selected in the previous steps get listed in the combo box. We have to select each item in the combo box and customize the columns in the selection. For primary key and foreign key columns, we have to specify whether the key is auto generated, and which field should be shown for this key in the front end. We can do this by the right clicking on the column names and selecting property option. |
|
|
The below screenshot shows the column property settings of the interface information. |
|
|
The below screenshot shows the coding information. Here we have to select the fields which we want to manipulate in the back end. |
|
|
At the end of the process we will get the following generated user interface and we will have the class and collection also.For the table postmst we got user interface fompostmst, class clspostmst and collection clspostmsts. |
|
|
|
|
|
|
| Now, we have finished seeing how to create master forms with codegeni. Now we are going to see how to create explorer style forms with codegeni. Assume we have selected explorer style in style selection, and selected tables required for the explorer style user interface. |
| Master - Explorer Style: |
This is the sample SQL Script for Explorer Style User Interface. Drop table DepMst Drop table UnitMst Drop table CompanyMst /* Company Master */ Create table CompanyMst( CompanyId Int Not Null, CompanyNm Varchar(50) Not Null constraint ukCompanyNm Unique, Add1 Varchar(50) Not Null, Add2 Varchar(50) Null, Add3 Varchar(50) Null, Add4 Varchar(50) Null, RegAdd1 Varchar(50) Null, RegAdd2 Varchar(50) Null, RegAdd3 Varchar(50) Null, RegAdd4 Varchar(50) Null, Phone Varchar(50) Null, Fax Varchar(50) Null, Email Varchar(100) Null, RegNo Varchar(50) Null, PermitNo Varchar(50) Null, Remarks VarChar(200) Null, CreaDt DateTime Not Null, CreaBy Int Not Null, ModiDt DateTime Null, ModiBy Int Null, Status Varchar(1) Null, constraint pkCompanyId Primary Key(CompanyId) ) go Create table UnitMst ( UnitId int Not Null, CompanyId Int Not Null, UnitNm Varchar(50) Not Null constraint ukUnitNm Unique, UnitShNm VarChar(3) Not Null constraint ukUnitShNm Unique, Add1 Varchar(50) Null, Add2 Varchar(50) Null, Add3 Varchar(50) Null, Add4 Varchar(50) Null, Phone Varchar(50) Null, Fax Varchar(50) Null, Email Varchar(100) Null, CreaDt DateTime Not Null, CreaBy Int Not Null, ModiDt DateTime Null, ModiBy Int Null, Status Varchar(1) Null, constraint pkUnitId Primary Key(UnitId), Constraint FkCompIdUnit Foreign key(CompanyId) References CompanyMst(CompanyId) ) go Create table DepMst( DepId Int Not Null, DepNm Varchar(30) Not Null constraint ukDepNm Unique, UnitId Int Null, CreaDt DateTime Not Null, CreaBy Int Not Null, ModiDt DateTime Null, ModiBy Int Null, Status Varchar(1) Null, constraint pkDepId Primary Key(DepId), constraint fkUnitId Foreign key(UnitId) references UnitMst(UnitId) ) |
| Below is the interface information snapshot of Explorer Style. |
|
|
The Screen will create a explorer style program. Please select the parent, child tables for which you want to generate coding. Drag the table name from the List of table and Drop into the Selected Tables. |
|
|
Setup the column properties of all nodes as shown in the above two snapshots. |
|
|
As we did for master creation we have do the same here also. |
|
|
We just need to move the fields to the left side which we don't want to appear in the user interface. |
![]() |
The above snapshot shows the progress of creation of form files and class files and it is asking the main forms name. we have to give the main form name here. |
|
|
The above snapshot is the created screens and class modules. Such as, fomCompanymst, fomDepmst, fomUnitmst, MainTreeView, clsCompanymst, clsCompanymsts, clsDepmst, clsDepmsts, clsUnitmst, clsunitmsts. The below snapshot shows the working of the just created Explorer Style User Interface. |
|
|
The below snapshot shows the properties of the companynode of the treeview. |
|
|
|
Header - Detail 1: |
This is the sample SQL Script for Header - Detail 1. |
drop table slsInvDtbl drop table slsInvHtbl Create Table slsInvhtbl( UnitId Int Not Null, InvNo Int Not Null, InvDt DateTime Not Null, PtyNm Varchar(40) Null, Address Varchar(100) null, --AcId Int Not Null, Not Necessary TotAmt money Not Null, Remarks Varchar(200) Null, CreaBy Int Not Null, CreaDt dateTime Not Null, ModiBy Int Null, ModiDt DateTime Null, PrtFlag bit Null, Posted bit Null, Serial int Identity, Status Varchar(1) Null, Constraint pkInvhtbl Primary Key(UnitId,InvNo,InvDt), Constraint fksUnitid Foreign Key(UnitId) References UnitMst(UnitId)) --Constraint fksActId Foreign Key(AcId) References AccountMst(AcId)) No Need go Create Table slsInvdtbl( UnitId Int Not Null, InvNo Int Not Null, InvDt DateTime Not Null, ItemNm Varchar(50) Not Null, UomNm Varchar(30) Not Null, Qty Float Not Null, Rate Money Not Null, Value Money Not Null, Status Varchar(1) Null, Constraint pkInvdtbl Primary Key(UnitId,InvNo,InvDt,ItemNm, UomNm), Constraint fksdUnitid Foreign Key(UnitId) References UnitMst(UnitId)) select * from slsinvdtbl |
| Now, we are going to deal with Header Detail User Interface creation. After Selecting the tables from the table selection screen we will have to setup interface information as in the below screen. |
|
|
Just then, we will get the following screens generated. It is now ready to use. Just we will need to decorate controls. |
|
|
Working Versions of the Header Detail Form and Main Form. |
|
|
| Header - Detail 2: |
| This is the sample SQL Script for the Header - detail 2. |
Drop Table EmpMst go Create Table EmpMst( EmpId Int Not Null, EmpNm Varchar(60) Not Null, Dob DateTime Not Null, Doj DateTime Not Null, -- Date Joined Nin Varchar(11) Not Null, Add1 Varchar(50) Not Null, Add2 Varchar(50) Null, Add3 Varchar(50) Null, PostNm Varchar(15) Not Null, -- PostId Int Not Null, PhoneNo Varchar(50) Null, BasicPay Money Not Null, BankAcNo1 Varchar(20) Null, BankAcNo2 Varchar(20) Null, Status Varchar(1) Null, Constraint pkEmpMst Primary Key(EmpId), -- Constraint fkEMPostId Foreign key References PostMst(PostId) -- not required ) go |
Just with one table and using the header detail style of codegeni we can create the following kind of interface. |
|
|
| Please Contact Us at :genisofttech@yahoo.com for your queries.or visit as at: http://www.genisofttechnologies.com |