コード例 #1
0
        public static string AddSiteOption(string key)
        {
            key = Globals.GetProgramatlyName(key);

            if (!SiteGlobalOptions.Contains(key))
            {
                SiteGlobalOptions.Add(key, "");
            }
            return("SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(key) + ")");
        }
コード例 #2
0
        //-------------------------------------
        public static string GetOptionalCondition(string hasPropertyString, bool withAnd)
        {
            string condition = "SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(hasPropertyString) + ")";

            if (withAnd)
            {
                return(" && " + condition);
            }
            else
            {
                return(condition);
            }
        }
コード例 #3
0
        //-------------------------------------
        public static string AddTableOption(string tableId, string key)
        {
            key = Globals.GetProgramatlyName(key);
            TableOptions tableOptions;

            if (!TablesOptions.Contains(tableId))
            {
                tableOptions     = new TableOptions(tableId);
                tableOptions.Key = tableId;
                TablesOptions.Add(tableId, tableOptions);
            }
            else
            {
                tableOptions = (TableOptions)TablesOptions[tableId];
            }
            tableOptions.AddTableOption(key);
            //-------------------------
            return("SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(key) + ")");
        }
コード例 #4
0
        private string CreateLoadData()
        {
            StringBuilder loadDataStart  = new StringBuilder();
            StringBuilder loadDataChecks = new StringBuilder();
            StringBuilder loadDataBody   = new StringBuilder();
            StringBuilder loadDataEnd    = new StringBuilder();
            string        id             = Globals.GetProgramatlyName(ID.Name);

            id = Globals.ConvetStringToCamelCase(id);
            loadDataStart.Append("\n\t#region ---------------LoadData---------------");
            loadDataStart.Append("\n\t//-----------------------------------------------");
            loadDataStart.Append("\n\t//LoadData");
            loadDataStart.Append("\n\t//-----------------------------------------------");
            loadDataStart.Append("\n\tprotected void LoadData()");
            loadDataStart.Append("\n\t{");
            //Add Urls Property
            SiteUrlsBuilder.AddParameter(Globals.GetProgramatlyName(ID.Name));
            loadDataStart.Append("\n\t\tif(MoversFW.Components.UrlManager.ChechIsValidIntegerParameter(" + SiteUrlsBuilder.GetIdentifire() + Globals.GetProgramatlyName(ID.Name) + "))");
            loadDataStart.Append("\n\t\t{");
            loadDataStart.Append("\n\t\t\t" + Globals.GetAliasDataType(ID.Datatype) + " " + id + " = Convert.To" + Globals.GetDataType(ID.Datatype) + "(Request.QueryString[" + SiteUrlsBuilder.GetIdentifire() + Globals.GetProgramatlyName(ID.Name) + "]);");

            loadDataStart.Append("\n\t\t\t" + global.TableEntityClass + " " + global.EntityClassObject + " =" + global.TableFactoryClass + ".Get" + global.TableProgramatlyName + "Object(" + id + ");");
            loadDataChecks.Append("\n\t\t\tif (" + global.EntityClassObject + " != null)");
            loadDataChecks.Append("\n\t\t\t{");
            if (ProjectBuilder.HasMultiLanguages && SqlProvider.CheckISATableIsMultiLanguage(SqlProvider.obj.TableName))
            {
                loadDataChecks.Append("\n\t\t\t\t//");
                loadDataChecks.Append("\n\t\t\t\t//Check Valid Language to avoid changing query string manualy");
                loadDataChecks.Append("\n\t\t\t\tLanguages langid = (Languages)ResourceManager.GetCurrentLanguage();");
                loadDataChecks.Append("\n\t\t\t\tif (langid != " + global.EntityClassObject + ".LangID)");
                loadDataChecks.Append("\n\t\t\t\t{");
                loadDataChecks.Append("\n\t\t\t\t\tResponse.Redirect(\"default.aspx\");");
                loadDataChecks.Append("\n\t\t\t\t}");
            }
            //----------------------------------------------------------*/
            string datatype;
            string propertyName;
            string trPropertyName;
            string lblPropertyName;
            string optionalPropertyName;

            foreach (SQLDMO.Column column in Fields)
            {
                propertyName         = Globals.GetProgramatlyName(column.Name);
                trPropertyName       = "tr" + propertyName;
                lblPropertyName      = "lbl" + propertyName;
                optionalPropertyName = SiteOptionsBuilder.GetHasPropertyString(propertyName);
                //if ((ID == null || column.Name != ID.Name) && (column.Default == null || column.Default.Length != 0) && column.Name.ToLower() != ProjectBuilder.LangID)
                if ((ID == null || column.Name != ID.Name) && (column.Name.IndexOf("_") < 0) &&
                    column.Name.ToLower().IndexOf("password") < 0 &&
                    column.Name.ToLower().IndexOf("shortdescription") < 0 &&
                    column.Name.ToLower().IndexOf(ProjectBuilder.PriorityColumnName.ToLower()) < 0 &&
                    column.Name.ToLower().IndexOf(ProjectBuilder.IsAvailable.ToLower()) < 0 &&
                    column.Name.ToLower() != ProjectBuilder.LangID)
                {
                    TableConstraint cnstr = SqlProvider.obj.GetParentColumn(column.Name);
                    datatype = Globals.GetAliasDataType(column.Datatype);
                    if (datatype == "string")
                    {
                        if (cnstr == null)
                        {
                            if (column.Name == ProjectBuilder.PhotoExtensionColumnName)
                            {
                                //	hasPhoto = true;
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + ".HasPhotoExtension)");
                                loadDataBody.Append("\n\t\t\t\t{");
                                //Add Urls Property

                                SiteUrlsBuilder.AddDirectoryUrl("PhotoNormalThumbs", SiteUrlsBuilder.photoNormalUrl, Globals.GetProgramatlyName(Table), "");

                                loadDataBody.Append("\n\t\t\t\t\t" + imageName + ".Text = \" <a href='\" + " + SiteUrlsBuilder.GetIdentifire() + "BigPhotoThumbs + " + global.EntityClassObject + ".BigPhotoThumbs+\"' rel='lightbox'>\";");
                                loadDataBody.Append("\n\t\t\t\t\t" + imageName + ".Text += \"<img border='0' src='\" +" + SiteUrlsBuilder.GetIdentifire() + "PhotoNormalThumbs + " + global.EntityClassObject + ".NormalPhotoThumbs+\"'   class='Image' alt='\" + " + global.EntityClassObject + ".Title+\"' /></a>\";");

                                loadDataBody.Append("\n\t\t\t\t}");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t{");
                                loadDataBody.Append("\n\t\t\t\t\t" + PhotoContainerTr + ".Visible = false;");
                                loadDataBody.Append("\n\t\t\t\t}");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                                //loadDataBody.Append("\n\t\t\t\tViewState[\"" + ProjectBuilder.PhotoExtensionColumnName + "\"] = " + global.EntityClassObject + "." + ProjectBuilder.PhotoExtensionColumnName + ";");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                            }
                            else if (column.Name == "LogoExtension")
                            {
                                //hasPhoto = true;
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + ".HasLogoExtension)");
                                loadDataBody.Append("\n\t\t\t\t{");
                                //Add Urls Property
                                SiteUrlsBuilder.AddDirectoryUrl("LogoNormalThumbs", SiteUrlsBuilder.logoNormalUrl, Globals.GetProgramatlyName(Table), "");


                                loadDataBody.Append("\n\t\t\t\t\t" + logoName + ".Text = \" <a href='\" + " + SiteUrlsBuilder.GetIdentifire() + "BigLogoThumbs + " + global.EntityClassObject + ".BigLogoThumbs+\"' rel='lightbox'>\";");
                                loadDataBody.Append("\n\t\t\t\t\t" + logoName + ".Text += \"<img border='0' src='\" +" + SiteUrlsBuilder.GetIdentifire() + "LogoNormalThumbs + " + global.EntityClassObject + ".NormalLogoThumbs+\"'   class='Image' alt='\" + " + global.EntityClassObject + ".Title+\"' /></a>\";");


                                loadDataBody.Append("\n\t\t\t\t}");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t{");
                                loadDataBody.Append("\n\t\t\t\t\t" + LogoContainerTr + ".Visible = false;");
                                loadDataBody.Append("\n\t\t\t\t}");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                                //loadDataBody.Append("\n\t\t\t\tViewState[\"" + ProjectBuilder.LogoExtensionColumnName + "\"] = " + global.EntityClassObject + "." + ProjectBuilder.LogoExtensionColumnName + ";");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                            }
                            else if (column.Name == "FileExtension")
                            {
                                //hasFile = true;
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + ".HasFileExtension)");
                                loadDataBody.Append("\n\t\t\t\t{");
                                //Add Urls Property
                                SiteUrlsBuilder.AddDirectoryUrl("Files", SiteUrlsBuilder.filesUrl, Globals.GetProgramatlyName(Table), "");
                                loadDataBody.Append("\n\t\t\t\t\t" + fileName + ".NavigateUrl = " + SiteUrlsBuilder.GetIdentifire() + "Files + " + global.EntityClassObject + ".File;");
                                loadDataBody.Append("\n\t\t\t\t\t" + fileName + ".Text = " + ResourcesTesxtsBuilder.AddAdminGlobalText("DownLoadExistFile", TextType.Text) + ";");
                                loadDataBody.Append("\n\t\t\t\t}");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t{");
                                loadDataBody.Append("\n\t\t\t\t\t" + trPropertyName + ".Visible=false ;");
                                loadDataBody.Append("\n\t\t\t\t}");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                                //loadDataBody.Append("\n\t\t\t\tViewState[\"" + ProjectBuilder.FileExtensionColumnName + "\"] = " + global.EntityClassObject + "." + ProjectBuilder.FileExtensionColumnName + ";");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                            }
                            else if (column.Name.IndexOf("Extension") > -1)
                            {
                                string[] stringSeparators = new string[] { "Extension" };
                                string[] separatingResult = column.Name.Split(stringSeparators, StringSplitOptions.None);
                                propertyName = separatingResult[0];
                                string uploaderID     = "fu" + propertyName;
                                string downloadLinkID = "hl" + propertyName;

                                //hasFile = true;
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + ".Has" + propertyName + "Extension)");
                                loadDataBody.Append("\n\t\t\t\t{");
                                //Add Urls Property
                                SiteUrlsBuilder.AddDirectoryUrl(propertyName + "s", SiteUrlsBuilder.otherFilesUrl, Globals.GetProgramatlyName(Table), propertyName + "s");
                                loadDataBody.Append("\n\t\t\t\t\t" + downloadLinkID + ".NavigateUrl = " + SiteUrlsBuilder.GetIdentifire() + propertyName + "s + " + global.EntityClassObject + "." + propertyName + ";");
                                loadDataBody.Append("\n\t\t\t\t\t" + downloadLinkID + ".Text =" + ResourcesTesxtsBuilder.AddAdminGlobalText("DownLoadExistFile", TextType.Text) + ";");
                                loadDataBody.Append("\n\t\t\t\t}");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t{");
                                loadDataBody.Append("\n\t\t\t\t\t" + trPropertyName + ".Visible=false ;");
                                loadDataBody.Append("\n\t\t\t\t}");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                                //loadDataBody.Append("\n\t\t\t\tViewState[\"" + Globals.GetProgramatlyName(column.Name) + "\"] = " + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ";");
                                //loadDataBody.Append("\n\t\t\t\t//------------------------------------------");
                            }
                            else if (column.Name.IndexOf("Date") > -1)
                            {
                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                                loadDataBody.Append("\n\t\t\t\t//" + Globals.GetProgramatlyName(column.Name));
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + "." + optionalPropertyName + ")");
                                loadDataBody.Append("\n\t\t\t\t\tlbl" + Globals.GetProgramatlyName(column.Name) + ".Text = " + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ".ToString();");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t\t" + trPropertyName + ".Visible=false ;");
                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                            }
                            else if (Globals.GetSqlDataType(column.Datatype) == SqlDbType.NText)
                            {
                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                                loadDataBody.Append("\n\t\t\t\t//" + Globals.GetProgramatlyName(column.Name));
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + "." + optionalPropertyName + ")");
                                loadDataBody.Append("\n\t\t\t\t\tlbl" + Globals.GetProgramatlyName(column.Name) + ".Text = Globals.SetLines(" + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ");");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t\t" + lblPropertyName + ".Visible=false ;");

                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                            }
                            else
                            {
                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                                loadDataBody.Append("\n\t\t\t\t//" + Globals.GetProgramatlyName(column.Name));
                                loadDataBody.Append("\n\t\t\t\tif (" + global.EntityClassObject + "." + optionalPropertyName + ")");
                                loadDataBody.Append("\n\t\t\t\t\tlbl" + Globals.GetProgramatlyName(column.Name) + ".Text = Globals.SetLines(" + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ");");
                                loadDataBody.Append("\n\t\t\t\telse");
                                loadDataBody.Append("\n\t\t\t\t\t" + trPropertyName + ".Visible=false ;");
                                loadDataBody.Append("\n\t\t\t\t//-------------------------------");
                            }
                        }
                        else
                        {
                        }
                    }
                    else if (datatype == "bool")
                    {
                        //loadDataBody.Append("\n\t\t\t\tcb" + Globals.GetProgramatlyName(column.Name) + ".Checked = " + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ";");
                        loadDataBody.Append("\n\t\t\t\tlbl" + Globals.GetProgramatlyName(column.Name) + ".Text = " + ResourcesTesxtsBuilder.AddUserText("True", TextType.Text) + ";");
                    }
                    else if (datatype != "byte[]" && datatype != "Object" && datatype != "Guid")
                    {
                        if (cnstr == null)
                        {
                            loadDataBody.Append("\n\t\t\t\tlbl" + Globals.GetProgramatlyName(column.Name) + ".Text = " + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ".ToString();");
                        }
                        else
                        {
                            //string text = SqlProvider.obj.GetExpectedNameForParent(cnstr.ParentTable);
                            //string _value = Globals.GetProgramatlyName(cnstr.ParentColID);
                            //string ddl;
                            //string methodName;
                            //BuildDropDownListsLoaderMethod(cnstr.ParentTable, text, _value, out ddl, out methodName);
                            //loadDataBody.Append("\n\t\t\t\t" + methodName + ";");
                            //loadDataBody.Append("\n\t\t\t\t" + ddl + ".SelectedValue = " + global.EntityClassObject + "." + Globals.GetProgramatlyName(column.Name) + ".ToString();");
                        }
                    }
                }
            }
            //End of object null value check
            loadDataEnd.Append("\n\t\t\t}");
            loadDataEnd.Append("\n\t\t\telse");
            loadDataEnd.Append("\n\t\t\t{");
            loadDataEnd.Append("\n\t\t\t\tResponse.Redirect(\"default.aspx\");");
            loadDataEnd.Append("\n\t\t\t}");
            //-------------------------------------
            //End of envalid parammeter check
            loadDataEnd.Append("\n\t\t}");
            loadDataEnd.Append("\n\t\telse");
            loadDataEnd.Append("\n\t\t{");
            loadDataEnd.Append("\n\t\t\tResponse.Redirect(\"default.aspx\");");
            loadDataEnd.Append("\n\t\t}");
            loadDataEnd.Append("\n\t}");
            loadDataEnd.Append("\n\t//-----------------------------------------------");
            loadDataEnd.Append("\n\t#endregion");

            return(loadDataStart.ToString() + loadDataChecks.ToString() + loadDataBody.ToString() + loadDataEnd.ToString());
        }
コード例 #5
0
        //
        public void  CreateTemplate()
        {
            StringBuilder template   = new StringBuilder();
            StringBuilder propreties = new StringBuilder();
            string        repeaterID = "dl" + global.TableProgramatlyName;
            //xmlTag

            //template.Append("\n\t\t\t");

            //--------------------------
            string datatype;
            string propertyName;
            string fullOptionalPropertyName;
            string idName          = Globals.GetProgramatlyName(ID.Name);;
            string detailsPageName = "DetailsPage";
            string detailsPagePath = "App_Forms/" + Table + "/details.aspx?" + Globals.GetProgramatlyName(ID.Name) + "={0}";

            SiteUrlsBuilder.AddUrl(detailsPageName, detailsPagePath);

            foreach (SQLDMO.Column column in Fields)
            {
                propertyName             = Globals.GetProgramatlyName(column.Name);
                fullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(propertyName);
                if ((ID == null || column.Name != ID.Name) && (column.Name.IndexOf("_") < 0) &&
                    column.Name.ToLower().IndexOf("password") < 0 &&
                    column.Name.ToLower().IndexOf("shortdescription") < 0 &&
                    column.Name.ToLower().IndexOf("priority") < 0 &&
                    column.Name.ToLower().IndexOf("isavailable ") < 0 &&
                    column.Name.ToLower() != ProjectBuilder.LangID)
                {
                    TableConstraint cnstr = SqlProvider.obj.GetParentColumn(column.Name);
                    datatype = Globals.GetAliasDataType(column.Datatype);
                    if (datatype == "bool")
                    {
                    }
                    else if (Globals.GetSqlDataType(column.Datatype) == SqlDbType.NText)
                    {
                        if (column.Name.ToLower().IndexOf("details") > -1)
                        {
                            hasDetails      = true;
                            detailsProprety = Globals.GetProgramatlyName(column.Name);
                        }
                        else if (column.Name.ToLower().IndexOf("description") > -1)
                        {
                            hasDescription      = true;
                            descriptionProprety = Globals.GetProgramatlyName(column.Name);
                        }
                    }
                    else if (datatype != "byte[]" && datatype != "Object" && datatype != "Guid" && column.Name.ToLower().IndexOf("password") < 0 && column.Name.ToLower() != ProjectBuilder.LangID)
                    {
                        if (column.Name.IndexOf(ProjectBuilder.ExtensionInColumnName) > -1)
                        {
                            if (column.Name == ProjectBuilder.PhotoExtensionColumnName)
                            {
                                hasPhoto      = true;
                                photoProprety = Globals.GetProgramatlyName(column.Name);
                            }
                            else if (column.Name == "LogoExtension")
                            {
                                hasLogo      = true;
                                logoProprety = Globals.GetProgramatlyName(column.Name);
                            }
                        }
                        else if (column.Name.ToLower().IndexOf("description") > -1)
                        {
                            hasDescription      = true;
                            descriptionProprety = Globals.GetProgramatlyName(column.Name);
                        }
                        else if (column.Name.ToLower().IndexOf("title") > -1)
                        {
                            hasTitle      = true;
                            titleProprety = Globals.GetProgramatlyName(column.Name);
                        }
                        else
                        {
                            //----------------------------------------
                            if (ProjectBuilder.HasConfiguration)
                            {
                                propreties.Append("\n\t\t\t\t<tr runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(fullOptionalPropertyName) + ") %>\">");
                            }
                            else
                            {
                                propreties.Append("\n\t\t\t\t<tr>");
                            }
                            propreties.Append("\n\t\t\t\t\t<td class=\"GText\">");
                            propreties.Append("\n\t\t\t\t\t\t<span class=\"GText\">" + ResourcesTesxtsBuilder.AddUserText(Globals.GetProgramatlyName(column.Name), TextType.HtmlClassic) + ": </span>");
                            propreties.Append("\n\t\t\t\t\t\t<span class=\"GValue\"><%#Eval(\"" + propertyName + "\") %></span>");
                            propreties.Append("\n\t\t\t\t\t</td>");
                            propreties.Append("\n\t\t\t\t\t</tr>");
                            //----------------------------------------
                        }
                    }
                }
            }
            template.Append("\n<!-- ------------------------ " + repeaterID + " ------------------------ -->");
            template.Append("\n<asp:DataList Width=\"100%\" ID=\"" + repeaterID + "\" RepeatColumns=\"1\" runat=\"server\">");
            template.Append("\n\t<ItemTemplate>");
            template.Append("\n\t\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"GTable\" border=\"0\">");
            template.Append("\n\t\t\t<tr>");
            template.Append("\n\t\t\t\t<td style=\"width: 100%; vertical-align:top;\">");
            template.Append("\n\t\t\t\t\t<table class=\"GData\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\">");
            if (hasTitle)
            {
                string titleFullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(titleProprety);
                if (ProjectBuilder.HasConfiguration)
                {
                    template.Append("\n\t\t\t\t\t<tr runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(titleFullOptionalPropertyName) + ") %>\">");
                }
                else
                {
                    template.Append("\n\t\t\t\t\t<tr>");
                }
                template.Append("\n\t\t\t\t\t\t<td class=\"GTitle\">");
                template.Append("\n\t\t\t\t\t\t\t<a class=\"GTitle\" href='<%# " + SiteUrlsBuilder.GetTheGetUrlMethodIdentifire() + "(\"" + detailsPageName + "\",Eval(\"" + idName + "\")) %>'>");
                template.Append("\n\t\t\t\t\t\t\t\t<%# Globals.SubStringByWords(DataBinder.Eval(Container, \"DataItem." + titleProprety + "\"),10) %>");
                template.Append("\n\t\t\t\t\t\t\t</a>");
                template.Append("\n\t\t\t\t\t\t</td>");
                template.Append("\n\t\t\t\t\t</tr>");
            }
            if (hasDetails)
            {
                string detailsFullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(detailsProprety);
                if (ProjectBuilder.HasConfiguration)
                {
                    template.Append("\n\t\t\t\t\t<tr runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(detailsFullOptionalPropertyName) + ") %>\">");
                }
                else
                {
                    template.Append("\n\t\t\t\t\t<tr>");
                }
                template.Append("\n\t\t\t\t\t\t<td class=\"GDetails\">");
                template.Append("\n\t\t\t\t\t\t\t\t<%# Globals.SubStringByWords(DataBinder.Eval(Container, \"DataItem." + detailsProprety + "\"), 30)%>");
                template.Append("\n\t\t\t\t\t\t\t</td>");
                template.Append("\n\t\t\t\t\t\t</tr>");
            }
            if (hasDescription)
            {
                string descriptionFullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(descriptionProprety);
                if (ProjectBuilder.HasConfiguration)
                {
                    template.Append("\n\t\t\t\t\t<tr runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(descriptionFullOptionalPropertyName) + ") %>\">");
                }
                else
                {
                    template.Append("\n\t\t\t\t\t<tr>");
                }
                template.Append("\n\t\t\t\t\t\t<td class=\"GDetails\">");
                template.Append("\n\t\t\t\t\t\t\t\t<%# Globals.SubStringByWords(DataBinder.Eval(Container, \"DataItem." + descriptionProprety + "\"), 30)%>");
                template.Append("\n\t\t\t\t\t\t\t</td>");
                template.Append("\n\t\t\t\t\t\t</tr>");
            }
            template.Append(propreties.ToString());
            template.Append("\n\t\t\t\t\t</table>");
            template.Append("\n\t\t\t\t</td>");
            if (hasPhoto || hasLogo)
            {
                template.Append("\n\t\t\t\t<td style=\"text-align:center; vertical-align:top;\">");
                if (hasPhoto)
                {
                    string photoFullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(photoProprety);
                    if (ProjectBuilder.HasConfiguration)
                    {
                        template.Append("\n\t\t\t\t\t<table runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(photoFullOptionalPropertyName) + ") %>\" cellpadding=\"0\" cellspacing=\"0\" class=\"GImageContainer\">");
                    }
                    else
                    {
                        template.Append("\n\t\t\t\t\t<table  cellpadding=\"0\" cellspacing=\"0\" class=\"GImageContainer\">");
                    }

                    template.Append("\n\t\t\t\t\t\t<tr>");
                    template.Append("\n\t\t\t\t\t\t\t<td>");
                    template.Append("\n\t\t\t\t\t\t\t\t<a href='<%# " + SiteUrlsBuilder.GetTheGetUrlMethodIdentifire() + "(\"" + detailsPageName + "\",Eval(\"" + idName + "\")) %>'>");
                    template.Append("\n\t\t\t\t\t\t\t\t\t<img alt=\"<%# DataBinder.Eval(Container, \"DataItem." + titleProprety + "\") %>\"");
                    template.Append("\n\t\t\t\t\t\t\t\t\t\tclass=\"GImage\" src='<%# " + global.TableFactoryClass + ".Get" + global.TableProgramatlyName + "PhotoThumbnail(Eval(\"" + idName + "\"),Eval(\"" + photoProprety + "\")) %>' /></a>");
                    template.Append("\n\t\t\t\t\t\t\t</td>");
                    template.Append("\n\t\t\t\t\t\t</tr>");
                    template.Append("\n\t\t\t\t\t</table>");
                }
                if (hasLogo)
                {
                    string logoFullOptionalPropertyName = SiteOptionsBuilder.GetFullHasPropertyString(logoProprety);
                    if (ProjectBuilder.HasConfiguration)
                    {
                        template.Append("\n\t\t\t\t\t<table runat=\"server\" visible=\"<%# SiteOptions.CheckOption(" + SiteOptionsBuilder.GetFullPropertyPath(logoFullOptionalPropertyName) + ") %>\" cellpadding=\"0\" cellspacing=\"0\" class=\"GImageContainer\">");
                    }
                    else
                    {
                        template.Append("\n\t\t\t\t\t<table  cellpadding=\"0\" cellspacing=\"0\" class=\"GImageContainer\">");
                    }

                    template.Append("\n\t\t\t\t\t\t<tr>");
                    template.Append("\n\t\t\t\t\t\t\t<td>");

                    template.Append("\n\t\t\t\t\t\t\t\t<a href='<%# " + SiteUrlsBuilder.GetTheGetUrlMethodIdentifire() + "(\"" + detailsPageName + "\",Eval(\"" + idName + "\")) %>'>");
                    template.Append("\n\t\t\t\t\t\t\t\t\t<img alt=\"<%# DataBinder.Eval(Container, \"DataItem." + titleProprety + "\") %>\"");
                    template.Append("\n\t\t\t\t\t\t\t\t\t\tclass=\"GImage\" src='<%# " + global.TableFactoryClass + ".Get" + global.TableProgramatlyName + "LogoThumbnail(Eval(\"" + idName + "\"),Eval(\"" + logoProprety + "\")) %>' /></a>");
                    template.Append("\n\t\t\t\t\t\t\t</td>");
                    template.Append("\n\t\t\t\t\t\t</tr>");
                    template.Append("\n\t\t\t\t\t</table>");
                }
                template.Append("\n\t\t\t\t</td>");
            }
            template.Append("\n\t\t\t</tr>");
            template.Append("\n\t\t</table>");
            template.Append("\n\t</ItemTemplate>");
            template.Append("\n</asp:DataList>");
            template.Append("\n<!-- ------------------------ --------------- ------------------------ -->");
            //
            AppTemplates.Append(template.ToString());
        }
コード例 #6
0
        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();
        }
コード例 #7
0
        //
        private string GeneratePageLoad()
        {
            string pageLoadBody = "\n\t\tlblResult.Text=\"\";";

            pageLoadBody += "\n\t\tif(!IsPostBack)";
            pageLoadBody += "\n\t\t{";
            if (ProjectBuilder.HasConfiguration)
            {
                pageLoadBody += "\n\t\t\tSiteOptions.CheckModuleWithHandling(Resources.SiteOptions." + SiteOptionsBuilder.GetHasPropertyString(Table) + ", ViewerType.Admin);";
            }
            pageLoadBody += "\n\t\t\tPagerManager.PrepareAdminPager(pager);";
            pageLoadBody += "\n\t\t\tpager.Visible = false;";
            string gridID = "dg" + global.TableProgramatlyName;

            //pageLoadBody += "\n\t\t\t" + gridID + ".Columns[" + gridID + ".Columns.Count - 2].HeaderText = " + ResourcesTesxtsBuilder.AddAdminGlobalText("Update", TextType.Text) + ";";
            //pageLoadBody += "\n\t\t\t" + gridID + ".Columns[" + gridID + ".Columns.Count - 1].HeaderText = " + ResourcesTesxtsBuilder.AddAdminGlobalText("Delete", TextType.Text) + ";";
            pageLoadBody += "\n\t\t\tLoadData();";
            pageLoadBody += "\n\t\t}";
            return(GeneratePageLoadHandler(pageLoadBody));
        }
コード例 #8
0
        //--------------------------------------
        //
        protected string GenerateClass()
        {
            StringBuilder pageCode = new StringBuilder();

            pageCode.Append("using System;\n");
            pageCode.Append("using System.Data;\n");
            pageCode.Append("using System.Configuration;\n");
            pageCode.Append("using System.Collections;\n");
            pageCode.Append("using System.Web;\n");
            pageCode.Append("using System.Web.Security;\n");
            pageCode.Append("using System.Web.UI;\n");
            pageCode.Append("using System.Web.UI.WebControls;\n");
            pageCode.Append("using System.Web.UI.WebControls.WebParts;\n");
            pageCode.Append("using System.Web.UI.HtmlControls;\n");
            pageCode.Append("using System.Drawing;\n");
            pageCode.Append("\npublic partial class Default : System.Web.UI.Page");
            pageCode.Append("\n{");
            pageCode.Append("\n\t#region --------------LoadData--------------");
            pageCode.Append("\n\t//---------------------------------------------------------");
            pageCode.Append("\n\t//Page_Load");
            pageCode.Append("\n\t//---------------------------------------------------------");
            pageCode.Append("\n\tprotected void Page_Load(object sender, EventArgs e)");
            pageCode.Append("\n\t{");
            pageCode.Append("\n\t\tif (!IsPostBack)");
            pageCode.Append("\n\t\t{");
            if (ProjectBuilder.HasConfiguration)
            {
                pageCode.Append("\n\t\t\tSiteOptions.CheckModuleWithHandling(Resources.SiteOptions." + SiteOptionsBuilder.GetHasPropertyString(global.TableProgramatlyName) + ", ViewerType.User);");
            }
            pageCode.Append("\n\t\t}");
            pageCode.Append("\n\t}");
            pageCode.Append("\n\t//--------------------------------------------------------");
            pageCode.Append("\n\t#endregion");
            pageCode.Append("\n\t");
            pageCode.Append("\n}");
            return(pageCode.ToString());
        }
コード例 #9
0
        //
        public static void AddItems()
        {
            Globals global = new Globals();

            //depend on the current table
            _NavigationItems.Append("\n\t\t\t#region --------------" + global.TableProgramatlyName + "--------------");
            string tabforIf = "";

            if (ProjectBuilder.HasConfiguration)
            {
                _NavigationItems.Append("\n\t\t\tif (SiteOptions.CheckModule(Resources.SiteOptions." + SiteOptionsBuilder.GetHasPropertyString(global.TableProgramatlyName) + ", ViewerType.Admin))");
                _NavigationItems.Append("\n\t\t\t{");
                tabforIf = "\t";
            }
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "//---------------------------------------");
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "//" + global.TableProgramatlyName);
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "NavItem nav" + global.TableProgramatlyName + " = new NavItem(\"" + global.TableProgramatlyName + "\", " + ResourcesTesxtsBuilder.AddUserText(global.TableProgramatlyName + "ModuleTitle", TextType.Text) + ");");
            //_NavigationItems.Append("\n\t\t\t" + tabforIf + "nav" + global.TableProgramatlyName + ".AddLink(" + ResourcesTesxtsBuilder.AddUserText("AddNew" + global.TableProgramatlyName, TextType.Text) + ", \"/Admin/" + global.TableProgramatlyName + "/add.aspx\");");
            //_NavigationItems.Append("\n\t\t\t" + tabforIf + "nav" + global.TableProgramatlyName + ".AddLink(" + ResourcesTesxtsBuilder.AddUserText("ShowAll" + global.TableProgramatlyName, TextType.Text) + ", \"/Admin/" + global.TableProgramatlyName + "/default.aspx\");");
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "nav" + global.TableProgramatlyName + ".AddLink(Resources.Admin.Add ,  \"/Admin/" + global.TableProgramatlyName + "/add.aspx\");");
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "nav" + global.TableProgramatlyName + ".AddLink(Resources.Admin.ViewAll , \"/Admin/" + global.TableProgramatlyName + "/default.aspx\");");

            _NavigationItems.Append("\n\t\t\t" + tabforIf + "menu.Controls.Add(nav" + global.TableProgramatlyName + ");");
            _NavigationItems.Append("\n\t\t\t" + tabforIf + "//--------------------------------------");
            if (ProjectBuilder.HasConfiguration)
            {
                _NavigationItems.Append("\n\t\t\t}");
            }
            _NavigationItems.Append("\n\t\t\t#endregion");
        }
コード例 #10
0
        //--------------------------------------
        //
        protected string GenerateClass()
        {
            string id = Globals.GetProgramatlyName(ID.Name);

            id = Globals.ConvetStringToCamelCase(id);
            string headerProperity = "";
            string boxHeader       = "";

            if (Fields.Count >= 2)
            {
                SQLDMO.Column headerColumn = (SQLDMO.Column)Fields.Item(1);

                headerProperity = Globals.GetProgramatlyName(headerColumn.Name);
                boxHeader       = global.EntityClassObject + "." + headerProperity;
            }
            else
            {
                boxHeader = "\"\"";
            }
            StringBuilder pageCode = new StringBuilder();

            pageCode.Append("using System;\n");
            pageCode.Append("using System.Data;\n");
            pageCode.Append("using System.Configuration;\n");
            pageCode.Append("using System.Collections;\n");
            pageCode.Append("using System.Web;\n");
            pageCode.Append("using System.Web.Security;\n");
            pageCode.Append("using System.Web.UI;\n");
            pageCode.Append("using System.Web.UI.WebControls;\n");
            pageCode.Append("using System.Web.UI.WebControls.WebParts;\n");
            pageCode.Append("using System.Web.UI.HtmlControls;\n");
            pageCode.Append("using System.Drawing;\n");
            pageCode.Append("\npublic partial class Details : System.Web.UI.Page");
            pageCode.Append("\n{");
            pageCode.Append("\n\t#region --------------LoadData--------------");
            pageCode.Append("\n\t//---------------------------------------------------------");
            pageCode.Append("\n\t//Page_Load");
            pageCode.Append("\n\t//---------------------------------------------------------");
            pageCode.Append("\n\tprotected void Page_Load(object sender, EventArgs e)");
            pageCode.Append("\n\t{");
            pageCode.Append("\n\t\tif (!IsPostBack)");
            pageCode.Append("\n\t\t{");
            if (ProjectBuilder.HasConfiguration)
            {
                pageCode.Append("\n\t\t\tSiteOptions.CheckModuleWithHandling(Resources.SiteOptions." + SiteOptionsBuilder.GetHasPropertyString(Table) + ", ViewerType.User);");
            }
            pageCode.Append("\n\t\t\t//Set Boxes Headers");
            pageCode.Append("\n\t\t\tSetBoxesHeaders();");
            pageCode.Append("\n\t\t}");
            pageCode.Append("\n\t}");
            pageCode.Append("\n\t//--------------------------------------------------------");
            pageCode.Append("\n\t#endregion");
            pageCode.Append("\n\t");
            pageCode.Append("\n\t#region Set Boxes Headers");
            pageCode.Append("\n\t//--------------------------------------------------------");
            pageCode.Append("\n\t//Set Boxes Headers");
            pageCode.Append("\n\t//--------------------------------------------------------");
            pageCode.Append("\n\tprotected void SetBoxesHeaders()");
            pageCode.Append("\n\t{");
            SiteUrlsBuilder.AddParameter(Globals.GetProgramatlyName(ID.Name));
            pageCode.Append("\n\t\tif(MoversFW.Components.UrlManager.ChechIsValidIntegerParameter(" + SiteUrlsBuilder.GetIdentifire() + Globals.GetProgramatlyName(ID.Name) + "))");
            pageCode.Append("\n\t\t{");
            pageCode.Append("\n\t\t\t" + Globals.GetAliasDataType(ID.Datatype) + " " + id + " = Convert.To" + Globals.GetDataType(ID.Datatype) + "(Request.QueryString[" + SiteUrlsBuilder.GetIdentifire() + Globals.GetProgramatlyName(ID.Name) + "]);");

            pageCode.Append("\n\t\t\t" + global.TableEntityClass + " " + global.EntityClassObject + " =" + global.TableFactoryClass + ".Get" + global.TableProgramatlyName + "Object(" + id + ");");
            pageCode.Append("\n\t\t\tif (" + global.EntityClassObject + " != null)");
            pageCode.Append("\n\t\t\t{");
            pageCode.Append("\n\t\t\t\t" + masterBoxID + ".Header = " + boxHeader + ";");
            pageCode.Append("\n\t\t\t}");

            pageCode.Append("\n\t\t\telse");
            pageCode.Append("\n\t\t\t{");
            pageCode.Append("\n\t\t\t\tResponse.Redirect(\"/default.aspx\");");
            pageCode.Append("\n\t\t\t}");
            pageCode.Append("\n\t\t}");
            pageCode.Append("\n\t\telse");
            pageCode.Append("\n\t\t{");
            pageCode.Append("\n\t\t\tResponse.Redirect(\"/default.aspx\");");
            pageCode.Append("\n\t\t}");

            pageCode.Append("\n\t}");
            pageCode.Append("\n\t//--------------------------------------------------------");
            pageCode.Append("\n\t#endregion");
            pageCode.Append("\n}");
            return(pageCode.ToString());
        }
コード例 #11
0
        //
        #region ClassMember
        public string CreateInfoPropreties()
        {
            try
            {
                //Add Optional
                if (ProjectBuilder.HasConfiguration)
                {
                    string tableOptional = SiteOptionsBuilder.GetHasPropertyString(global.TableProgramatlyName);
                    SiteOptionsBuilder.AddSiteOption(tableOptional);
                }
                //
                string xmlDocumentation = "";
                //
                StringBuilder EntityPropreties = new StringBuilder();
                //
                string dataType;
                string dataTypeAlias;
                string propertyName;
                string memberName;
                foreach (SQLDMO.Column colCurrent in Fields)
                {
                    //Note dataType for checks & dataTypeAlias for writing
                    dataType      = Globals.GetAliasDataType(colCurrent.Datatype);
                    dataTypeAlias = dataType;
                    propertyName  = Globals.GetProgramatlyName(colCurrent.Name);
                    memberName    = " _" + Globals.GetProgramatlyName(colCurrent.Name);
                    #region Base Property
                    EntityPropreties.Append("\n\t#region --------------" + propertyName + "--------------");
                    if (colCurrent.Name.ToLower() == "langid")
                    {
                        dataTypeAlias = "Languages";
                    }
                    if (dataType == "string")
                    {
                        EntityPropreties.Append("\n\tprivate " + dataTypeAlias + memberName + "= \"\";");
                    }
                    else if (dataType == "Guid")
                    {
                        EntityPropreties.Append("\n\tprivate " + dataTypeAlias + memberName + "= Guid.NewGuid();");
                    }
                    else if (dataType == "DateTime")
                    {
                        EntityPropreties.Append("\n\tprivate " + dataTypeAlias + memberName + "= DateTime.MinValue;");
                    }
                    else
                    {
                        EntityPropreties.Append("\n\tprivate " + dataTypeAlias + memberName + ";");
                    }
                    //XML Documentaion
                    xmlDocumentation  = "\n";
                    xmlDocumentation += "\n\t/// <summary>\n";
                    xmlDocumentation += "\t/// Gets or sets " + SqlProvider.obj.TableName + " " + propertyName + ". \n";
                    xmlDocumentation += "\t/// </summary>";
                    if (ProjectBuilder.AllowXmlDocumentation)
                    {
                        EntityPropreties.Append(xmlDocumentation);
                    }
                    //Propretie body
                    EntityPropreties.Append("\n\tpublic " + dataTypeAlias + " " + propertyName);
                    EntityPropreties.Append("\n\t{");
                    EntityPropreties.Append("\n\t\tget { return " + memberName + " ; }");
                    EntityPropreties.Append("\n\t\tset { " + memberName + "= value ; }");
                    EntityPropreties.Append("\n\t}");
                    EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                    EntityPropreties.Append("\n\t#endregion");
                    #endregion
                    if (ProjectBuilder.HasProprety)
                    {
                        #region ------------HasProperty---------------
                        if ((ID == null || colCurrent.Name != ID.Name))
                        {
                            string hasPropertyString     = SiteOptionsBuilder.GetHasPropertyString(propertyName);
                            string fullHasPropertyString = SiteOptionsBuilder.GetFullHasPropertyString(propertyName);
                            string conditionLine         = "";
                            if (ProjectBuilder.HasConfiguration)
                            {
                                SiteOptionsBuilder.AddTableOption(fullHasPropertyString);
                            }
                            if (dataType == "string" || dataType == "byte[]")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + ".Length > 0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + ".Length > 0) ";
                                }
                                //--------------------------------------------------
                            }

                            else if (dataType == "bool")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + ") ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "DateTime")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " != DateTime.MinValue" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " != DateTime.MinValue) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "decimal")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0.0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0.0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "double")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0.0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0.0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "Single")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " != null" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " != null) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "short")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "int")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "long")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "byte")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " > 0" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " > 0) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "Guid")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " != null" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " != null) ";
                                }
                                //--------------------------------------------------
                            }
                            else if (dataType == "Object")
                            {
                                //--------------------------------------------------
                                if (ProjectBuilder.HasConfiguration)
                                {
                                    conditionLine = "if( " + memberName + " != null" + SiteOptionsBuilder.GetOptionalCondition(fullHasPropertyString, true) + ") ";
                                }
                                else
                                {
                                    conditionLine = "if( " + memberName + " != null) ";
                                }
                                //--------------------------------------------------
                            }



                            EntityPropreties.Append("\n\t#region --------------" + hasPropertyString + "--------------");
                            EntityPropreties.Append("\n\tpublic bool " + hasPropertyString);
                            EntityPropreties.Append("\n\t{");
                            EntityPropreties.Append("\n\t\tget");
                            EntityPropreties.Append("\n\t\t{");
                            EntityPropreties.Append("\n\t\t\t" + conditionLine);
                            EntityPropreties.Append("\n\t\t\t{ ");
                            EntityPropreties.Append("\n\t\t\t\treturn true;");
                            EntityPropreties.Append("\n\t\t\t} ");
                            EntityPropreties.Append("\n\t\t\telse");
                            EntityPropreties.Append("\n\t\t\t{");
                            EntityPropreties.Append("\n\t\t\t\treturn false;");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t}");
                            EntityPropreties.Append("\n\t}");
                            EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                            EntityPropreties.Append("\n\t#endregion");
                            //------------------------------------------
                        }
                        #endregion
                    }
                    #region Additional Properties for files properties
                    //Additional Properties for files properties
                    if (dataType == "string" && colCurrent.Name.IndexOf("Extension") > -1)
                    {
                        string[] stringSeparators = new string[] { "Extension" };
                        string[] separatingResult = colCurrent.Name.Split(stringSeparators, StringSplitOptions.None);
                        propertyName = separatingResult[0];

                        //Property
                        EntityPropreties.Append("\n\t#region --------------" + propertyName + "--------------");

                        EntityPropreties.Append("\n\tpublic string " + propertyName);
                        EntityPropreties.Append("\n\t{");
                        EntityPropreties.Append("\n\t\tget");
                        EntityPropreties.Append("\n\t\t{");
                        EntityPropreties.Append("\n\t\t\tif( " + memberName + ".Length > 0) ");
                        EntityPropreties.Append("\n\t\t\t{ ");
                        EntityPropreties.Append("\n\t\t\t\treturn " + global.TableFactoryClass + ".Create" + Table + propertyName + "Name(_" + Globals.GetProgramatlyName(ID.Name) + ")+ " + memberName + ";");
                        EntityPropreties.Append("\n\t\t\t}");
                        EntityPropreties.Append("\n\t\t\telse");
                        EntityPropreties.Append("\n\t\t\t{");
                        EntityPropreties.Append("\n\t\t\t\treturn \"\";");
                        EntityPropreties.Append("\n\t\t\t}");
                        EntityPropreties.Append("\n\t\t}");
                        EntityPropreties.Append("\n\t}");
                        EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                        EntityPropreties.Append("\n\t#endregion");
                        //----------------------------------------------------------
                        //Additional photos Properties
                        if (colCurrent.Name.ToLower().IndexOf("photo") > -1 || colCurrent.Name.ToLower().IndexOf("logo") > -1)
                        {
                            //Micro thumbnail
                            EntityPropreties.Append("\n\t#region --------------Micro" + propertyName + "Thumbs--------------");
                            EntityPropreties.Append("\n\tpublic string Micro" + propertyName + "Thumbs");
                            EntityPropreties.Append("\n\t{");
                            EntityPropreties.Append("\n\t\tget");
                            EntityPropreties.Append("\n\t\t{");
                            EntityPropreties.Append("\n\t\t\tif( " + memberName + ".Length > 0) ");
                            EntityPropreties.Append("\n\t\t\t{ ");
                            EntityPropreties.Append("\n\t\t\t\treturn " + global.TableFactoryClass + ".Create" + Table + propertyName + "Name(_" + Globals.GetProgramatlyName(ID.Name) + ")+  MoversFW.Thumbs.thumbnailExetnsion ;");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t\telse");
                            EntityPropreties.Append("\n\t\t\t{");
                            EntityPropreties.Append("\n\t\t\t\treturn \"\";");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t}");
                            EntityPropreties.Append("\n\t}");
                            EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                            EntityPropreties.Append("\n\t#endregion");
                            //-----------------------------------------------------------
                            //Mini thumbnail
                            EntityPropreties.Append("\n\t#region --------------Mini" + propertyName + "Thumbs--------------");
                            EntityPropreties.Append("\n\tpublic string Mini" + propertyName + "Thumbs");
                            EntityPropreties.Append("\n\t{");
                            EntityPropreties.Append("\n\t\tget");
                            EntityPropreties.Append("\n\t\t{");
                            EntityPropreties.Append("\n\t\t\tif( " + memberName + ".Length > 0) ");
                            EntityPropreties.Append("\n\t\t\t{ ");
                            EntityPropreties.Append("\n\t\t\t\treturn " + global.TableFactoryClass + ".Create" + Table + propertyName + "Name(_" + Globals.GetProgramatlyName(ID.Name) + ")+  MoversFW.Thumbs.thumbnailExetnsion ;");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t\telse");
                            EntityPropreties.Append("\n\t\t\t{");
                            EntityPropreties.Append("\n\t\t\t\treturn \"\";");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t}");
                            EntityPropreties.Append("\n\t}");
                            EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                            EntityPropreties.Append("\n\t#endregion");
                            //-----------------------------------------------------------
                            //Normal thumbnail
                            EntityPropreties.Append("\n\t#region --------------Normal" + propertyName + "Thumbs--------------");
                            EntityPropreties.Append("\n\tpublic string Normal" + propertyName + "Thumbs");
                            EntityPropreties.Append("\n\t{");
                            EntityPropreties.Append("\n\t\tget");
                            EntityPropreties.Append("\n\t\t{");
                            EntityPropreties.Append("\n\t\t\tif( " + memberName + ".Length > 0) ");
                            EntityPropreties.Append("\n\t\t\t{ ");
                            EntityPropreties.Append("\n\t\t\t\treturn " + global.TableFactoryClass + ".Create" + Table + propertyName + "Name(_" + Globals.GetProgramatlyName(ID.Name) + ")+  MoversFW.Thumbs.thumbnailExetnsion ;");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t\telse");
                            EntityPropreties.Append("\n\t\t\t{");
                            EntityPropreties.Append("\n\t\t\t\treturn \"\";");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t}");
                            EntityPropreties.Append("\n\t}");
                            EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                            EntityPropreties.Append("\n\t#endregion");
                            //-----------------------------------------------------------
                            //Big thumbnail
                            EntityPropreties.Append("\n\t#region --------------Big" + propertyName + "Thumbs--------------");
                            EntityPropreties.Append("\n\tpublic string Big" + propertyName + "Thumbs");
                            EntityPropreties.Append("\n\t{");
                            EntityPropreties.Append("\n\t\tget");
                            EntityPropreties.Append("\n\t\t{");
                            EntityPropreties.Append("\n\t\t\tif( " + memberName + ".Length > 0) ");
                            EntityPropreties.Append("\n\t\t\t{ ");
                            EntityPropreties.Append("\n\t\t\t\treturn " + global.TableFactoryClass + ".Create" + Table + propertyName + "Name(_" + Globals.GetProgramatlyName(ID.Name) + ")+  MoversFW.Thumbs.thumbnailExetnsion ;");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t\telse");
                            EntityPropreties.Append("\n\t\t\t{");
                            EntityPropreties.Append("\n\t\t\t\treturn \"\";");
                            EntityPropreties.Append("\n\t\t\t}");
                            EntityPropreties.Append("\n\t\t}");
                            EntityPropreties.Append("\n\t}");
                            EntityPropreties.Append("\n\t" + Globals.MetthodsSeparator);
                            EntityPropreties.Append("\n\t#endregion");
                            //-----------------------------------------------------------
                        }
                    }
                    #endregion
                }
                //

                EntityPropreties.Append("\n");
                return(EntityPropreties.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show("My Generated Code Exception:" + ex.Message);
                return("");
            }
        }