/// <summary> /// 添加模板 /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int AddTemplate(Template item, Admin admin) { int rtn = HandlersFactory.adminHandlers.CheckAdminPower(admin); if (rtn < 0) return rtn; item.Id = Guid.NewGuid().ToString(); return DataBaseFactory.TemplateHandlers.AddTemplate(item); }
/// <summary> /// 添加模板 /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int AddTemplateForXml(Template item, Admin admin) { int rtn = HandlersFactory.adminHandlers.CheckAdminPower(admin); if (rtn < 0) return rtn; //单页时地址不能为空 if (((int)item.TemplateType) == -1 && string.IsNullOrEmpty(item.vcUrl)) { return -1000000024; } //模板内容不能为空 if (string.IsNullOrEmpty(item.Content)) { return -1000000027; } return DataBaseFactory.TemplateHandlers.AddTemplate(item); }
/// <summary> /// 修改模板信息 /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int MdyTemplate(Template item) { //单页时地址不能为空 if (((int)item.TemplateType) == -1 && string.IsNullOrEmpty(item.vcUrl)) { return -1000000024; } //模板内容不能为空 if (string.IsNullOrEmpty(item.Content)) { return -1000000027; } string sql = "UPDATE Template SET vcTempName='" + item.vcTempName + "',vcContent='" + item.Content.Replace("'", "''") + "',vcUrl='" + item.vcUrl + "',dUpdateDate=getdate(),iParentId='" + item.iParentId + "' WHERE Id = '" + item.Id + "'"; string errText = string.Empty; return MsSqlFactory.conn.m_RunSQL(ref errText, sql); }
/// <summary> /// 添加模板 /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int AddTemplate(Template item) { //单页时地址不能为空 if (((int)item.TemplateType) == -1 && string.IsNullOrEmpty(item.vcUrl)) { return -1000000024; } //模板内容不能为空 if (string.IsNullOrEmpty(item.Content)) { return -1000000027; } string Sql = "INSERT INTO Template (Id,SkinId,TemplateType,iParentId,iSystemType,vcTempName,vcContent,vcUrl,dUpdateDate,dAddDate)" + "VALUES('" + item.Id + "','" + item.SkinInfo.Id + "','" + (int)item.TemplateType + "','" + item.iParentId + "','" + item.iSystemType + "','" + item.vcTempName + "','" + item.Content.Replace("'", "''") + "','" + item.vcUrl + "',GETDATE(),GETDATE())"; string errText = string.Empty; return MsSqlFactory.conn.m_RunSQL(ref errText, Sql); }
/// <summary> /// ���ģ�� /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int AddTemplateForXml(Template item, Admin admin) { SqlParameter sp0 = new SqlParameter("@vcAdminName", SqlDbType.VarChar, 50); sp0.Value = admin.vcAdminName; SqlParameter sp1 = new SqlParameter("@vcip", SqlDbType.VarChar, 15); sp1.Value = objectHandlers.UserIp; SqlParameter sp2 = new SqlParameter("@SkinId", SqlDbType.VarChar, 36); sp2.Value = item.SkinInfo; SqlParameter sp3 = new SqlParameter("@TemplateType", SqlDbType.Int, 4); sp3.Value = (int)item.TemplateType; SqlParameter sp4 = new SqlParameter("@vcTempName", SqlDbType.VarChar, 50); sp4.Value = item.vcTempName; SqlParameter sp5 = new SqlParameter("@vcContent", SqlDbType.Text, 0); sp5.Value = item.Content; SqlParameter sp6 = new SqlParameter("@vcUrl", SqlDbType.VarChar, 255); sp6.Value = item.vcUrl; SqlParameter sp7 = new SqlParameter("@iParentId", SqlDbType.VarChar, 36); sp7.Value = item.iParentId; SqlParameter sp8 = new SqlParameter("@iSystemType", SqlDbType.Int, 4); sp8.Value = item.iSystemType; SqlParameter sp9 = new SqlParameter("@Id", SqlDbType.VarChar, 36); sp9.Value = item.Id; SqlParameter sp10 = new SqlParameter("@reValue", SqlDbType.Int); sp10.Direction = ParameterDirection.Output; string[] reValues = conn.Execute("SP_Template_ManageTemplate", new SqlParameter[] { sp0, sp1, sp2, sp3, sp4, sp5, sp6, sp7 , sp8 , sp9,sp10}, new int[] { 10 }); if (reValues != null) { int rtn = (int)Convert.ChangeType(reValues[0], typeof(int)); return rtn; } return -19000000; }
/// <summary> /// 从记录行中得到实体 /// </summary> /// <param name="?"></param> /// <param name="type"></param> /// <returns></returns> public EntityBase GetEntityObjectFromRow(DataRow row, Type type) { if (row == null) return null; switch (type.ToString()) { case "TCG.Entity.Categories": Categories categories = new Categories(); categories.Id = row["Id"].ToString().Trim(); categories.ResourceListTemplate = this.handlerService.skinService.templateHandlers.GetTemplateByID(row["iListTemplate"].ToString()); categories.iOrder = (int)row["iOrder"]; categories.Parent = row["Parent"].ToString().Trim(); categories.ResourceTemplate = this.handlerService.skinService.templateHandlers.GetTemplateByID(row["iTemplate"].ToString()); categories.vcClassName = row["vcClassName"].ToString().Trim(); categories.vcDirectory = row["vcDirectory"].ToString().Trim(); categories.vcName = row["vcName"].ToString().Trim(); categories.vcUrl = row["vcUrl"].ToString().Trim(); categories.dUpdateDate = (DateTime)row["dUpdateDate"]; categories.cVisible = row["Visible"].ToString().Trim(); categories.DataBaseService = row["DataBaseService"].ToString().Trim(); //categories.SkinInfo = row["SkinId"].ToString().Trim(); return (EntityBase)categories; case "TCG.Entity.Resources": Resources resources = new Resources(); resources.Id = row["iId"].ToString(); resources.vcTitle = row["vcTitle"].ToString(); resources.Categorie = this.handlerService.skinService.categoriesHandlers.GetCategoriesById(row["iClassID"].ToString()); resources.vcUrl = (string)row["vcUrl"].ToString(); resources.vcContent = (string)row["vcContent"].ToString().Trim(); resources.vcAuthor = (string)row["vcAuthor"].ToString().Trim(); resources.iCount = (int)row["iCount"]; resources.vcKeyWord = (string)row["vcKeyWord"].ToString().Trim(); resources.vcEditor = (string)row["vcEditor"].ToString().Trim(); resources.cCreated = (string)row["cCreated"].ToString().Trim(); resources.vcSmallImg = (string)row["vcSmallImg"].ToString().Trim(); resources.vcBigImg = (string)row["vcBigImg"].ToString().Trim(); resources.vcShortContent = (string)row["vcShortContent"].ToString().Trim(); resources.vcSpeciality = (string)row["vcSpeciality"].ToString().Trim(); resources.cChecked = (string)row["cChecked"].ToString().Trim(); resources.cDel = (string)row["cDel"].ToString().Trim(); resources.cPostByUser = (string)row["cPostByUser"].ToString().Trim(); resources.vcFilePath = (string)row["vcFilePath"].ToString().Trim(); resources.dAddDate = (DateTime)row["dAddDate"]; resources.dUpDateDate = (DateTime)row["dUpDateDate"]; resources.vcTitleColor = (string)row["vcTitleColor"].ToString().Trim(); resources.cStrong = (string)row["cStrong"].ToString().Trim(); resources.SheifUrl = (string)row["SheifUrl"].ToString().Trim(); CachingService.Set(resources.Id, resources, null); return (EntityBase)resources; case "TCG.Entity.Template": Template template = new Template(); template.Id = row["Id"].ToString(); //template.SkinInfo = row["SkinId"].ToString(); template.TemplateType = this.handlerService.skinService.templateHandlers.GetTemplateType((int)row["TemplateType"]); template.iParentId = row["iParentId"].ToString(); template.iSystemType = (int)row["iSystemType"]; template.vcTempName = (string)row["vcTempName"]; template.Content = (string)row["vcContent"]; template.vcUrl = (string)row["vcUrl"]; template.dAddDate = (DateTime)row["dAddDate"]; template.dUpdateDate = (DateTime)row["dUpdateDate"]; return (EntityBase)template; case "TCG.Entity.Skin": Skin skin = new Skin(); skin.Id = row["Id"].ToString().Trim(); skin.Name = row["Name"].ToString().Trim(); skin.Pic = row["Pic"].ToString().Trim(); //skin.Info = row["info"].ToString().Trim(); skin.Filename = row["Filename"].ToString().Trim(); return (EntityBase)skin; case "TCG.Entity.SheifSourceInfo": SheifSourceInfo sourceinfo = new SheifSourceInfo(); sourceinfo.Id = row["ID"].ToString().Trim(); sourceinfo.SourceName = row["SourceName"].ToString().Trim(); sourceinfo.SourceUrl = row["SourceUrl"].ToString().Trim(); sourceinfo.CharSet = row["CharSet"].ToString().Trim(); sourceinfo.ListAreaRole = row["ListAreaRole"].ToString().Trim(); sourceinfo.TopicListRole = row["TopicListRole"].ToString().Trim(); sourceinfo.TopicListDataRole = row["TopicListDataRole"].ToString().Trim(); sourceinfo.TopicRole = row["TopicRole"].ToString().Trim(); sourceinfo.TopicDataRole = row["TopicDataRole"].ToString().Trim(); sourceinfo.TopicPagerOld = row["TopicPagerOld"].ToString().Trim(); sourceinfo.TopicPagerTemp = row["TopicPagerTemp"].ToString().Trim(); sourceinfo.IsRss = (bool)row["IsRss"]; return (EntityBase)sourceinfo; case "TCG.Entity.FileCategories": FileCategories filecagegories = new FileCategories(); filecagegories.Id = row["iId"].ToString(); filecagegories.iParentId = objectHandlers.ToInt(row["iParentId"]); filecagegories.dCreateDate = objectHandlers.ToTime(row["dCreateDate"].ToString()); filecagegories.vcFileName = row["vcFileName"].ToString().Trim(); filecagegories.vcMeno = row["vcMeno"].ToString().Trim(); filecagegories.vcKey = row["vcKey"].ToString().Trim(); filecagegories.MaxSpace = objectHandlers.ToLong(row["MaxSpace"]); filecagegories.Space = objectHandlers.ToLong(row["Space"]); return (EntityBase)filecagegories; case "TCG.Entity.FileResources": FileResources fileresource = new FileResources(); fileresource.Id = row["iID"].ToString().Trim(); fileresource.iClassId = (int)row["iClassId"]; fileresource.iSize = (int)row["iSize"]; fileresource.vcFileName = row["vcFileName"].ToString().Trim(); fileresource.vcIP = row["vcIP"].ToString().Trim(); fileresource.vcType = row["vcType"].ToString().Trim(); fileresource.iRequest = (int)row["iRequest"]; fileresource.iDowns = (int)row["iDowns"]; fileresource.dCreateDate = (DateTime)row["dCreateDate"]; return (EntityBase)fileresource; case "TCG.Entity.SheifCategorieConfig": SheifCategorieConfig sheifcategorieconfig = new SheifCategorieConfig(); sheifcategorieconfig.Id = row["Id"].ToString(); sheifcategorieconfig.SheifSourceId = row["SheifSourceId"].ToString().Trim(); sheifcategorieconfig.LocalCategorieId = row["LocalCategorieId"].ToString().Trim(); sheifcategorieconfig.ResourceCreateDateTime = objectHandlers.ToTime(row["ResourceCreateDateTime"].ToString().Trim()); return (EntityBase)sheifcategorieconfig; } return null; }
/// <summary> /// 从XML中更新模板 /// </summary> /// <param name="skinid"></param> /// <param name="admin"></param> /// <returns></returns> public int UpdateTemplateFromXML(string skinid, Admin admin) { int rtn = HandlersFactory.adminHandlers.CheckAdminPower(admin); if (rtn < 0) return rtn; Skin skininfo = HandlersFactory.skinHandlers.GetSkinEntityBySkinId(skinid); if (skininfo == null) { return -1000000701; } XmlDocument document = new XmlDocument(); document.Load(HttpContext.Current.Server.MapPath("~/skin/" + skininfo.Filename + "/template.config")); XmlNodeList nodelist = document.GetElementsByTagName("Template"); if (nodelist != null && nodelist.Count > 0) { foreach (XmlElement element in nodelist) { Template template = new Template(); template.Id = element.SelectSingleNode("Id").InnerText.ToString(); template.Content = element.SelectSingleNode("Content").InnerText.ToString(); template.Content = Regex.Replace(template.Content, "<![CDATA[(.+?)]]>", "$1", RegexOptions.Multiline); template.SkinInfo = HandlersFactory.skinHandlers.GetSkinEntityBySkinId(element.SelectSingleNode("SkinId").InnerText.ToString()); template.TemplateType = this.GetTemplateType(objectHandlers.ToInt(element.SelectSingleNode("TemplateType").InnerText.ToString())); template.iParentId = element.SelectSingleNode("iParentId").InnerText.ToString(); template.iSystemType = objectHandlers.ToInt(element.SelectSingleNode("iSystemType").InnerText.ToString()); template.dUpdateDate = objectHandlers.ToTime(element.SelectSingleNode("dUpdateDate").InnerText.ToString()); template.dAddDate = objectHandlers.ToTime(element.SelectSingleNode("dAddDate").InnerText.ToString()); template.vcTempName = element.SelectSingleNode("vcTempName").InnerText.ToString(); template.vcUrl = element.SelectSingleNode("vcUrl").InnerText.ToString(); Template t_template = this.GetTemplateByID(template.Id); if (t_template == null) { this.AddTemplateForXml(template, admin); } else { this.MdyTemplate(template, admin); } } CachingService.Remove(CachingService.CACHING_All_TEMPLATES); CachingService.Remove(CachingService.CACHING_All_TEMPLATES_ENTITY); } return 1; }
/// <summary> /// ���ģ�� /// </summary> /// <param name="item"></param> /// <param name="admin"></param> /// <returns></returns> public int AddTemplate(Template item,Admin admin) { item.Id = Guid.NewGuid().ToString(); return this.AddTemplateForXml(item, admin); }
protected void Page_Load(object sender, EventArgs e) { //检测管理员登录 base.handlerService.manageService.adminHandlers.CheckAdminLogin(); base.handlerService.manageService.adminHandlers.CheckAdminPop(28); if (!Page.IsPostBack) { string SkinId = objectHandlers.Get("iSkinId"); string Parentid = objectHandlers.Get("iParentid"); int iSytemType = objectHandlers.ToInt(objectHandlers.Get("SytemType")); this.iParentid.Value = Parentid; this.SytemType.Value = iSytemType.ToString(); this.iSiteId.Value = SkinId; Template temp = base.handlerService.skinService.templateHandlers.GetTemplateByID(Parentid); if (temp != null) { string filepatch = base.handlerService.skinService.templateHandlers.GetTemplatePagePatch(Parentid); this.parentPath.Value = filepatch + "/"; } else { this.parentPath.Value = "/"; } //列表模板添加 if (Parentid == "1") { foreach (Option option in ConfigServiceEx.templateTypes.Values) { if (option.Value == "1") { this.tType.Items.Add(new ListItem(option.Text, option.Value)); this.tType.Value = option.Value; } } } else if (Parentid == "0")//跟目录 { foreach (Option option in ConfigServiceEx.templateTypes.Values) { if (option.Value == "0" || option.Value == "5") { this.tType.Items.Add(new ListItem(option.Text, option.Value)); } } } else if (Parentid == "2") // 详细页 { foreach (Option option in ConfigServiceEx.templateTypes.Values) { if (option.Value == "2") { this.tType.Items.Add(new ListItem(option.Text, option.Value)); this.tType.Value = option.Value; } } } else if (Parentid == "3") // 原件 { foreach (Option option in ConfigServiceEx.templateTypes.Values) { if (option.Value == "3") { this.tType.Items.Add(new ListItem(option.Text, option.Value)); this.tType.Value = option.Value; } } } else { foreach (Option option in ConfigServiceEx.templateTypes.Values) { if (option.Value == "0" || option.Value == "5") { this.tType.Items.Add(new ListItem(option.Text, option.Value)); } } } } else { Template item = new Template(); item.vcTempName = objectHandlers.Post("vcTempName"); item.TemplateType = base.handlerService.skinService.templateHandlers.GetTemplateType(objectHandlers.ToInt(objectHandlers.Post("tType"))); item.iParentId = objectHandlers.Post("iParentid"); item.iSystemType = objectHandlers.ToInt(objectHandlers.Post("SytemType")); item.vcUrl = objectHandlers.Post("vcUrl"); item.Content = objectHandlers.Post("vcContent").Replace("+", "+"); item.SkinInfo = base.handlerService.skinService.skinHandlers.GetSkinEntityBySkinId(objectHandlers.Post("iSiteId")); if (string.IsNullOrEmpty(item.vcTempName) || string.IsNullOrEmpty(item.Content)) { base.ajaxdata = "{state:false,message:\"模板内容和名称不能为空!\"}"; base.AjaxErch(base.ajaxdata); return; } if ((int)item.TemplateType == 0 && string.IsNullOrEmpty(item.vcUrl)) { base.ajaxdata = "{state:false,message:\"" + errHandlers.GetErrTextByErrCode(-1000000024, ConfigServiceEx.baseConfig["ManagePath"]) + "\"}"; base.AjaxErch(base.ajaxdata); } int rtn = 0; try { rtn = base.handlerService.skinService.templateHandlers.AddTemplate(item, base.adminInfo); rtn = base.handlerService.skinService.templateHandlers.CreateTemplateToXML(base.adminInfo, item.SkinInfo.Id); CachingService.Remove(CachingService.CACHING_All_TEMPLATES); CachingService.Remove(CachingService.CACHING_All_TEMPLATES_ENTITY); } catch (Exception ex) { base.ajaxdata = "{state:false,message:\"" + objectHandlers.JSEncode(ex.Message.ToString()) + "\"}"; base.AjaxErch(base.ajaxdata); return; } base.AjaxErch(rtn, "模板添加成功!"); item = null; } }
/// <summary> /// 从记录行中得到实体 /// </summary> /// <param name="?"></param> /// <param name="type"></param> /// <returns></returns> public static EntityBase GetEntityObjectFromRow(DataRow row, Type type) { if (row == null) return null; switch (type.ToString()) { case "TCG.Entity.Categories": Categories categories = new Categories(); categories.Id = row["Id"].ToString().Trim(); categories.ResourceListTemplate = templateHandlers.GetTemplateByID(row["iListTemplate"].ToString()); categories.iOrder = (int)row["iOrder"]; categories.Parent = row["Parent"].ToString().Trim(); categories.ResourceTemplate = templateHandlers.GetTemplateByID(row["iTemplate"].ToString()); categories.vcClassName = row["vcClassName"].ToString().Trim(); categories.vcDirectory = row["vcDirectory"].ToString().Trim(); categories.vcName = row["vcName"].ToString().Trim(); categories.vcUrl = row["vcUrl"].ToString().Trim(); categories.dUpdateDate = (DateTime)row["dUpdateDate"]; categories.cVisible = row["Visible"].ToString().Trim(); categories.DataBaseService = row["DataBaseService"].ToString().Trim(); categories.SkinInfo = skinHandlers.GetSkinEntityBySkinId(row["SkinId"].ToString().Trim()); categories.IsSinglePage = row["IsSinglePage"].ToString().Trim(); categories.vcPic = row["vcPic"].ToString().Trim(); categories.vcSpeciality = (row["vcSpeciality"] == null) ? "" : row["vcSpeciality"].ToString(); return (EntityBase)categories; case "TCG.Entity.Resources": Resources resources = new Resources(); resources.Id = row["Id"].ToString(); resources.vcTitle = row["vcTitle"].ToString(); resources.Categorie = categoriesHandlers.GetCategoriesById(row["iClassID"].ToString()); resources.vcUrl = (string)row["vcUrl"].ToString(); resources.vcContent = (string)row["vcContent"].ToString().Trim(); resources.vcAuthor = (string)row["vcAuthor"].ToString().Trim(); resources.iCount = (int)row["iCount"]; resources.vcKeyWord = (string)row["vcKeyWord"].ToString().Trim(); resources.vcEditor = (string)row["vcEditor"].ToString().Trim(); resources.cCreated = (string)row["cCreated"].ToString().Trim(); resources.vcSmallImg = (string)row["vcSmallImg"].ToString().Trim(); resources.vcBigImg = (string)row["vcBigImg"].ToString().Trim(); resources.vcShortContent = (string)row["vcShortContent"].ToString().Trim(); resources.vcSpeciality = (string)row["vcSpeciality"].ToString().Trim(); resources.cChecked = (string)row["cChecked"].ToString().Trim(); resources.cDel = (string)row["cDel"].ToString().Trim(); resources.cPostByUser = (string)row["cPostByUser"].ToString().Trim(); resources.vcFilePath = (string)row["vcFilePath"].ToString().Trim(); resources.dAddDate = (DateTime)row["dAddDate"]; resources.dUpDateDate = (DateTime)row["dUpDateDate"]; resources.vcTitleColor = (string)row["vcTitleColor"].ToString().Trim(); resources.cStrong = (string)row["cStrong"].ToString().Trim(); resources.SheifUrl = (string)row["SheifUrl"].ToString().Trim(); resources.PropertiesCategorieId = objectHandlers.ToInt(row["PropertiesCategorieId"]); resources.CCCategories = row["CCCategories"].ToString(); CachingService.Set(resources.Id, resources, null); return (EntityBase)resources; case "TCG.Entity.Template": Template template = new Template(); template.Id = row["Id"].ToString(); template.SkinInfo = skinHandlers.GetSkinEntityBySkinId(row["SkinId"].ToString()); template.TemplateType = templateHandlers.GetTemplateType((int)row["TemplateType"]); template.iParentId = row["iParentId"].ToString(); template.iSystemType = (int)row["iSystemType"]; template.vcTempName = (string)row["vcTempName"]; template.Content = (string)row["vcContent"]; template.vcUrl = (string)row["vcUrl"]; template.dAddDate = (DateTime)row["dAddDate"]; template.dUpdateDate = (DateTime)row["dUpdateDate"]; return (EntityBase)template; case "TCG.Entity.Skin": Skin skin = new Skin(); skin.Id = row["Id"].ToString().Trim(); skin.Name = row["Name"].ToString().Trim(); skin.Pic = row["Pic"].ToString().Trim(); skin.WebDescription = row["WebDescription"].ToString().Trim(); skin.Filename = row["Filename"].ToString().Trim(); skin.WebKeyWords = row["WebKeyWords"].ToString().Trim(); skin.IndexPage = row["IndexPage"].ToString().Trim(); return (EntityBase)skin; case "TCG.Entity.SheifSourceInfo": SheifSourceInfo sourceinfo = new SheifSourceInfo(); sourceinfo.Id = row["ID"].ToString().Trim(); sourceinfo.SourceName = row["SourceName"].ToString().Trim(); sourceinfo.SourceUrl = row["SourceUrl"].ToString().Trim(); sourceinfo.CharSet = row["CharSet"].ToString().Trim(); sourceinfo.ListAreaRole = row["ListAreaRole"].ToString().Trim(); sourceinfo.TopicListRole = row["TopicListRole"].ToString().Trim(); sourceinfo.TopicListDataRole = row["TopicListDataRole"].ToString().Trim(); sourceinfo.TopicRole = row["TopicRole"].ToString().Trim(); sourceinfo.TopicDataRole = row["TopicDataRole"].ToString().Trim(); sourceinfo.TopicPagerOld = row["TopicPagerOld"].ToString().Trim(); sourceinfo.TopicPagerTemp = row["TopicPagerTemp"].ToString().Trim(); sourceinfo.IsRss = (bool)row["IsRss"]; return (EntityBase)sourceinfo; case "TCG.Entity.FileCategories": //FileCategories filecagegories = new FileCategories(); //filecagegories.Id = row["iId"].ToString(); //filecagegories.iParentId = objectHandlers.ToInt(row["iParentId"]); //filecagegories.dCreateDate = objectHandlers.ToTime(row["dCreateDate"].ToString()); //filecagegories.vcFileName = row["vcFileName"].ToString().Trim(); //filecagegories.vcMeno = row["vcMeno"].ToString().Trim(); //filecagegories.vcKey = row["vcKey"].ToString().Trim(); //filecagegories.MaxSpace = objectHandlers.ToLong(row["MaxSpace"]); //filecagegories.Space = objectHandlers.ToLong(row["Space"]); //return (EntityBase)filecagegories; case "TCG.Entity.FileResources": //FileResources fileresource = new FileResources(); //fileresource.Id = row["iID"].ToString().Trim(); //fileresource.iClassId = (int)row["iClassId"]; //fileresource.iSize = (int)row["iSize"]; //fileresource.vcFileName = row["vcFileName"].ToString().Trim(); //fileresource.vcIP = row["vcIP"].ToString().Trim(); //fileresource.vcType = row["vcType"].ToString().Trim(); //fileresource.iRequest = (int)row["iRequest"]; //fileresource.iDowns = (int)row["iDowns"]; //fileresource.dCreateDate = (DateTime)row["dCreateDate"]; //return (EntityBase)fileresource; case "TCG.Entity.SheifCategorieConfig": SheifCategorieConfig sheifcategorieconfig = new SheifCategorieConfig(); sheifcategorieconfig.Id = row["Id"].ToString(); sheifcategorieconfig.SheifSourceId = row["SheifSourceId"].ToString().Trim(); sheifcategorieconfig.LocalCategorieId = row["LocalCategorieId"].ToString().Trim(); sheifcategorieconfig.ResourceCreateDateTime = objectHandlers.ToTime(row["ResourceCreateDateTime"].ToString().Trim()); return (EntityBase)sheifcategorieconfig; case "TCG.Entity.Properties": Properties categorieProperties = new Properties(); categorieProperties.Id = row["Id"].ToString(); categorieProperties.ProertieName = row["ProertieName"].ToString(); categorieProperties.PropertiesCategorieId = row["PropertiesCategorieId"].ToString(); categorieProperties.Type = row["Type"].ToString(); categorieProperties.Values = row["Values"].ToString(); categorieProperties.width = objectHandlers.ToInt(row["width"].ToString()); categorieProperties.height = objectHandlers.ToInt(row["height"].ToString()); categorieProperties.iOrder = objectHandlers.ToInt(row["iOrder"].ToString()); return (EntityBase)categorieProperties; case "TCG.Entity.ResourceProperties": ResourceProperties rategorieProperties = new ResourceProperties(); rategorieProperties.Id = row["Id"].ToString(); rategorieProperties.ResourceId = row["ResourceId"].ToString(); rategorieProperties.PropertieName = row["PropertieName"].ToString(); rategorieProperties.PropertieValue = row["PropertieValue"].ToString(); rategorieProperties.PropertieId = objectHandlers.ToInt(row["PropertieId"].ToString()); rategorieProperties.iOrder = objectHandlers.ToInt(row["iOrder"].ToString()); return (EntityBase)rategorieProperties; case "TCG.Entity.PropertiesCategorie": PropertiesCategorie pc = new PropertiesCategorie(); pc.CategoriePropertiesName = row["CategoriePropertiesName"].ToString(); pc.Id = row["Id"].ToString(); pc.Visible = row["Visible"].ToString(); pc.Visible = row["Visible"].ToString(); return (EntityBase)pc; case "TCG.Entity.Speciality": Speciality speciality = new Speciality(); speciality.Id = row["Id"].ToString(); speciality.SkinId = (string)row["SkinId"]; speciality.iParent = (int)row["iParent"]; speciality.vcTitle = (string)row["vcTitle"]; speciality.vcExplain = (string)row["vcExplain"]; speciality.dUpDateDate = (DateTime)row["dUpDateDate"]; return (EntityBase)speciality; case "TCG.Entity.FeedBack": FeedBack feedBack = new FeedBack(); feedBack.Id = row["Id"].ToString(); feedBack.UserName = row["UserName"].ToString(); feedBack.Tel = row["Tel"].ToString(); feedBack.QQ = row["QQ"].ToString(); feedBack.Content = row["Content"].ToString(); feedBack.AddDate = objectHandlers.ToTime(row["AddDate"].ToString()); feedBack.Ip = row["Ip"].ToString(); feedBack.SkinId = row["SkinId"].ToString(); feedBack.Title = row["Title"].ToString(); feedBack.Email = row["Email"].ToString(); return (EntityBase)feedBack; } return null; }