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();
        }
예제 #2
0
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            StoredProcedure.WriteStoredProcedure(GenerateProcedure(ProcedureAndMethodName));
            txtProcedure.Text += Environment.NewLine;
            string _class;

            _class  = new SqlDataProviderBuilder().CreateInsertUpdateDeleteMethod(StoredProcedureTypes.Create, ProcedureAndMethodName, allParameters);
            _class += new ClassFactoryBuilder().CreateInsertUpdateDeleteMethod(StoredProcedureTypes.Create, ProcedureAndMethodName, allParameters);
            //Admin Add Page---------------------------------------------
            InterfaceType type = (InterfaceType)selInterfaceType.SelectedIndex;

            Create_InterfaceBuilder.Create(type, allParameters, ProcedureAndMethodName);
            Create_CodeBehindBuilder.Create(type, allParameters, ProcedureAndMethodName);
            FileManager.CreateFile(Globals.BaseDirectory + "TempClass.cs", _class);
            //-----------------------------------------------------------
        }
예제 #3
0
        //----------------------------------------------------------
        public static void Create()
        {
            ClassFactoryBuilder dp = new ClassFactoryBuilder();

            dp.CreateClassFile();
        }
        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();
        }