public static void CreateProject()
        {
            SqlProvider.obj.Connect();
            CreateThetemplateFiles();
            AdminNavigationBuilder adminNavBuilder = new AdminNavigationBuilder();

            foreach (Table table in SqlProvider.obj.Tables)
            {
                if (!table.SystemObject)
                {
                    SqlProvider.obj.Refresh();
                    SqlProvider.obj.Table     = table;
                    SqlProvider.obj.TableName = table.Name;
                    //
                    StoredProcedure.Create();
                    SqlDataProviderBuilder.Create();
                    //DataProviderBuilder.Create();This Step was Canceled
                    ClassEntityBuilder.Create();
                    ClassFactoryBuilder.Create();

                    if (!SqlProvider.obj.ISTableForRelations)
                    {
                        //Create User Control
                        Create_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                        Create_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                        //Admin Add Page
                        Create_InterfaceBuilder.Create(InterfaceType.WebForm);
                        Create_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        //-----------------------------------------------------------
                        //Edit User Control
                        Update_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                        Update_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                        //Admin Edit Page
                        Update_InterfaceBuilder.Create(InterfaceType.WebForm);
                        Update_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        //-----------------------------------------------------------
                        //Get All User Control
                        GetAll_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                        GetAll_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                        //Admin Default Page
                        GetAll_InterfaceBuilder.Create(InterfaceType.WebForm);
                        GetAll_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        //
                        adminNavBuilder.AddItems();
                    }
                }
            }
            if (ProjectBuilder.ProjectType == ProjectType.All)
            {
                SecurityBuilder.Create();
                adminNavBuilder.CreateControlFile();
            }

            SqlProvider.obj.DisConnect();
            CreateSLN();

            WebConfigBuilder.Create();
            //VirtualDirectoryBuilder.Create();
        }
Exemple #2
0
        //
        public static void Create(InterfaceType type, Hashtable allParameters, string operation)
        {
            GetAll_InterfaceBuilder cr = new GetAll_InterfaceBuilder(type);
            Globals global             = new Globals();

            cr.ClassName     = global.TableProgramatlyName + "_" + operation;
            cr.allParameters = allParameters;
            cr.GenerateInterface();
        }
Exemple #3
0
        //
        public static void Create(InterfaceType type)
        {
            GetAll_InterfaceBuilder cr = new GetAll_InterfaceBuilder(type);

            cr.GenerateInterface();
        }
        public static void CreateProject()
        {
            CreateThetemplateFiles();
            SqlProvider.obj.Connect();

            foreach (SQLDMO.Table table in SqlProvider.obj.Tables)
            {
                if (!table.SystemObject && table.Name.ToLower() != "sysdiagrams")
                {
                    SqlProvider.obj.Refresh();
                    SqlProvider.obj.Table     = table;
                    SqlProvider.obj.TableName = table.Name;
                    //---------------------------------
                    if (SqlProvider.obj.ISTableForRelations)
                    {
                        IsEntityTable = false;
                    }
                    else
                    {
                        IsEntityTable = true;
                    }
                    //---------------------------------
                    StoredProcedure.Create();
                    SqlDataProviderBuilder.Create();
                    //DataProviderBuilder.Create();This Step was Canceled
                    ClassEntityBuilder.Create();
                    ClassFactoryBuilder.Create();

                    if (!SqlProvider.obj.ISTableForRelations)
                    {
                        //Create User Control
                        Create_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                        Create_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                        //Admin Add Page
                        Create_InterfaceBuilder.Create(InterfaceType.WebForm);
                        Create_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        //-----------------------------------------------------------
                        //Edit User Control
                        Update_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                        Update_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                        //Admin Edit Page
                        Update_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        Update_InterfaceBuilder.Create(InterfaceType.WebForm);
                        //-----------------------------------------------------------
                        if (AllowAdminSorting)
                        {
                            //Get All WithSorting User Control
                            GetAllWithSorting_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                            GetAllWithSorting_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                            //Admin Default With Sorting Page
                            GetAllWithSorting_InterfaceBuilder.Create(InterfaceType.WebForm);
                            GetAllWithSorting_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        }
                        else
                        {
                            //Get All User Control
                            GetAll_InterfaceBuilder.Create(InterfaceType.WEbUserControl);
                            GetAll_CodeBehindBuilder.Create(InterfaceType.WEbUserControl);
                            //Admin Default Page
                            GetAll_InterfaceBuilder.Create(InterfaceType.WebForm);
                            GetAll_CodeBehindBuilder.Create(InterfaceType.WebForm);
                        }
                        //-----------------------------------------------------------

                        //-----------------------------------------------------------
                        //Get All For User User Control
                        GetAllForUser_InterfaceBuilder.Create();
                        GetAllForUser_CodeBehindBuilder.Create();
                        //-----------------------------------------------------------
                        //Details User Control
                        Details_InterfaceBuilder.Create();
                        Details_CodeBehindBuilder.Create();
                        //-----------------------------------------------------------
                        //Default page
                        UserDefaultPage_InterfaceBuilder.Create();
                        UserPage_CodeBehindBuilder.Create();
                        //-----------------------------------------------------------
                        //Details
                        DetailsPage_InterfaceBuilder.Create();
                        DetailsPage_CodeBehindBuilder.Create();
                        //-----------------------------------------------------------
                        //
                        AppTemplateBuilder.AddTemplate();
                        AdminNavigationBuilder.AddItems();
                        //-----------------------------------------------------------
                    }
                }
            }
            if (ProjectBuilder.ProjectType == ProjectType.All)
            {
                SecurityBuilder.Create();
            }

            SqlProvider.obj.DisConnect();
            //SiteUrlsBuilder
            SiteUrlsBuilder.Create();
            //SiteUrlsBuilder.CreateSiteUrlsConfig();
            //-------------------------------------
            //SiteSettingsBuilder
            SiteSettingsBuilder.Create();
            //SiteSettingsBuilder.CreateSiteSettingsConfig();
            //-------------------------------------
            //
            ResourcesTesxtsBuilder.Create();
            SiteOptionsBuilder.Create();

/*
 *                      //SiteOptionsBuilder
 *                      if (HasConfiguration)
 *                      {
 *                              SiteOptionsBuilder.CreateSiteOptionsClass();
 *                              SiteOptionsBuilder.CreateSiteOptionsConfig();
 *                      }*/
            //-------------------------------------
            //
            /*ResourcesTesxtsBuilder.CreateAdminMenueArXmlConfig();*/
            //ResourcesTesxtsBuilder.CreateAdminMenueEnXmlConfig();
            AdminNavigationBuilder.CreatePartialClass();
            //-------------------------------------
            //SiteTemplateXmlBuilder.CreateTemplateFile();
            AppTemplateBuilder.CreateAppTemlatesFile();
            //-------------------------------------
            CreateSLN(ProjectVersions.V2005);
            CreateSLN(ProjectVersions.V2008);
            WebConfigBuilder.Create();
            //VirtualDirectoryBuilder.Create();
        }