本文整理汇总了C#中WebService.venuesEntities类的典型用法代码示例。如果您正苦于以下问题:C# venuesEntities类的具体用法?C# venuesEntities怎么用?C# venuesEntities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
venuesEntities类属于WebService命名空间,在下文中一共展示了venuesEntities类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DeleteADs
public static String DeleteADs( string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
//string strSql = string.Format("SELECT tad.ADImage,tad.ADName,tad.ID FROM tbl_ad AS tad");
//ObjectQuery<DbDataRecord> results = db.CreateQuery<DbDataRecord>(strSql);
//foreach (DbDataRecord item in results)
//{
// db.DeleteObject(item);
//};
//if (db.SaveChanges() != 0)
// returnStr = "成功!";
//else
ObjectQuery<tbl_ad> query = db.tbl_ad;
foreach (tbl_ad item in query)
{
db.DeleteObject(item);
}
db.SaveChanges();
returnStr = "成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_HandBookSetManager, "删除广告信息,错误信息:" + e.Message, loginUserInfo);
}
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_HandBookSetManager, "删除广告信息", loginUserInfo);
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:35,代码来源:ADManager.cs
示例2: GetHandBook
public static string GetHandBook()
{
JObject ja = new JObject();
try
{
using (venuesEntities db = new venuesEntities())
{
string strSql = "SELECT tbo.BookBackgroundImg,tbo.BookCreateTIme,tbo.BookFacebookLink,tbo.BookTwitterLink,tbo.BookWeiboLink,tbo.BookWeixinLink,tbo.ID FROM tbl_book AS tbo";
ObjectQuery<DbDataRecord> kss = db.CreateQuery<DbDataRecord>(strSql);
foreach (var ks in kss)
{
string adsInfo = ADManager.GetAllAd(null);
JArray objAdsInfo = JArray.Parse(adsInfo);
ja = new JObject(
new JProperty("ID", ks["ID"].ToString()),
new JProperty("BookBackgroundImg", ks["BookBackgroundImg"].ToString()),
new JProperty("BookCreateTIme", ks["BookCreateTIme"].ToString()),
new JProperty("BookFacebookLink", ks["BookFacebookLink"].ToString()),
new JProperty("BookTwitterLink", ks["BookTwitterLink"].ToString()),
new JProperty("BookWeiboLink", ks["BookWeiboLink"].ToString()),
new JProperty("BookWeixinLink", ks["BookWeixinLink"].ToString()),
new JProperty("AdInfo", objAdsInfo)
);
};
}
}
catch (Exception e)
{
// LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_HandBookSetManager, "查询手册信息,error=" + e.Message, loginUserInfo);
}
return ja.ToString();
}
开发者ID:zyyecho,项目名称:venues,代码行数:34,代码来源:InterfaceManager.cs
示例3: AddPageModuleAttribute
public static string AddPageModuleAttribute(string addInfo, string loginUserInfo,int pageID,int templateID)
{
string returnStr = "";
JObject objVenue = JObject.Parse(addInfo);
try
{
using (venuesEntities db = new venuesEntities())
{
DeletePageModuleAttributeByPageModuleIDAndMAKey(int.Parse(objVenue["ModuleID"].ToString()), loginUserInfo, pageID, int.Parse(objVenue["MAKey"].ToString()));
tbl_page_module_attribute tva = new tbl_page_module_attribute();
tva.ModuleID = int.Parse(objVenue["ModuleID"].ToString());
tva.PageID = pageID;
tva.TmplateID = templateID;
tva.MAKey = int.Parse(objVenue["MAKey"].ToString());
tva.MAValue = objVenue["MAValue"].ToString();
db.AddTotbl_page_module_attribute(tva);
if (db.SaveChanges() != 0)
{
returnStr = KeyManager.RetrunSucceed;
}
else
{
returnStr = KeyManager.RetrunUnSucceed;
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_PagesManager, "新增页面模块其他属性, pageID=" + pageID + "addInfo=" + addInfo, loginUserInfo);
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_PagesManager, "新增页面模块其他属性, pageID=" + pageID + "addInfo=" + addInfo + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:35,代码来源:PageModuleAttributeManager.cs
示例4: DeleteModuleByTemplateID
public static String DeleteModuleByTemplateID(int TemplateID, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
ObjectQuery<tbl_module> tva = db.tbl_module.Where("[email protected]", new ObjectParameter("v", TemplateID));
ObjectResult<tbl_module> results = tva.Execute(MergeOption.NoTracking);
foreach (tbl_module item in results)
{
db.AttachTo("tbl_module", item);
db.DeleteObject(item);
//删除模块关联的其他属性信息
DeleteModuleAttributeByModuleID(item.ID, loginUserInfo);
};
if (db.SaveChanges() != 0)
returnStr = KeyManager.RetrunSucceed;
else
returnStr =KeyManager.RetrunUnSucceed;
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_ModulesManager, "根据TemplateID删除模块所属改模板的模块信息,TemplateID=" + TemplateID + ";错误信息:" + e.Message, loginUserInfo);
}
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_ModulesManager, "根据TemplateID删除模块所属改模板的模块信息,TemplateID=" + TemplateID, loginUserInfo);
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:33,代码来源:ModuleManager.cs
示例5: DeleteGuestMessageByIDs
public static string DeleteGuestMessageByIDs(String guestMessageIds, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
List<string> glist = new List<string>(guestMessageIds.Split(','));
foreach (String cId in glist)
{
if (cId != "")
{
int curID = int.Parse(cId);
tbl_guest_message bus = db.tbl_guest_message.First<tbl_guest_message>(a => a.ID.Equals(curID));
db.DeleteObject(bus);
}
}
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_VisitorManager, "根据游客留言id删除游客留言记录,guestMessageIds=" + guestMessageIds, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VisitorManager, "根据游客留言id删除游客留言记录,guestMessageIds=" + guestMessageIds + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:34,代码来源:GuestManager.cs
示例6: DeletePageContentByPageID
public static string DeletePageContentByPageID(int pageID,string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
ObjectQuery<tbl_page_content> tva = db.tbl_page_content.Where("[email protected]", new ObjectParameter("v", pageID));
ObjectResult<tbl_page_content> results = tva.Execute(MergeOption.NoTracking);
foreach (tbl_page_content item in results)
{
db.AttachTo("tbl_page_content", item);
db.DeleteObject(item);
};
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_PagesManager, "删除页面内容成功,pageID=" + pageID, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_PagesManager, "删除页面内容,pageID=" + pageID + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:31,代码来源:PageContentManager.cs
示例7: DeleteUser
/// <summary>
/// 删除指定用户
/// </summary>
/// <param name="UserId">用户ID</param>
/// <returns></returns>
public static String DeleteUser(int curUserId, int deleteUserId, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
tbl_sys_user su = db.tbl_sys_user.First<tbl_sys_user>(a => a.User_Id.Equals(deleteUserId));
db.DeleteObject(su);
AuthorityManager.deleteAllAuthoriyByUserID(deleteUserId, KeyManager.UserTypeId_SystemUser, loginUserInfo);
if (db.SaveChanges() != 0)
returnStr = "成功!";
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SystemUsersManager, "删除用户,deleteUserId=" + deleteUserId + ";错误信息:" + e.Message, loginUserInfo);
}
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_SystemUsersManager, "删除用户,deleteUserId=" + deleteUserId, loginUserInfo);
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:31,代码来源:UserManager.cs
示例8: DeleteVenuesByIDs
/// <summary>
/// 根据场所id列表删除场所记录
/// </summary>
/// <param name="curUserID"></param>
/// <param name="venuesIds"></param>
/// <returns></returns>
public static string DeleteVenuesByIDs(int curUserID, String venuesIds, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
List<string> venuelist = new List<string>(venuesIds.Split(','));
foreach (String cVenueId in venuelist)
{
if (cVenueId != "")
{
int curlogID = int.Parse(cVenueId);
tbl_sys_businessman bus = db.tbl_sys_businessman.First<tbl_sys_businessman>(a => a.Business_Id.Equals(cVenueId));
db.DeleteObject(bus);
}
}
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_VenusManager, "删除场所成功,venuesIds=" + venuesIds, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VenusManager, "删除场所成功,venuesIds=" + venuesIds + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:40,代码来源:BusinessmanManager.cs
示例9: AddVenueAttribute
public static string AddVenueAttribute(int venueId, string addInfo, string loginUserInfo)
{
string returnStr = "";
JObject objVenue = JObject.Parse(addInfo);
try
{
using (venuesEntities db = new venuesEntities())
{
tbl_venue_attribute tva = new tbl_venue_attribute();
tva.VenueID = venueId;
tva.VenueAttributeKey = int.Parse(objVenue["otherValueNameId"].ToString());
tva.VenueAttributeValue = objVenue["otherValueContent"].ToString();
db.AddTotbl_venue_attribute(tva);
if (db.SaveChanges() != 0)
{
returnStr = KeyManager.RetrunSucceed;
}
else
{
returnStr = KeyManager.RetrunUnSucceed;
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VenusManager, "新增场所其他属性成功,venueId=" + venueId + ",addInfo=" + addInfo, loginUserInfo);
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VenusManager, "新增场所其他属性成功,venueId=" + venueId + ",addInfo=" + addInfo + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:32,代码来源:VenueAttributeManager.cs
示例10: GetAllTheme
public static string GetAllTheme()
{
JArray ja = new JArray();
try
{
using (venuesEntities db = new venuesEntities())
{
string strSql = "SELECT tt.ID,tt.ThemeImage,tt.ThemeName,tt.Sequence FROM tbl_theme AS tt ORDER BY tt.Sequence";
ObjectQuery<DbDataRecord> kss = db.CreateQuery<DbDataRecord>(strSql);
foreach (var ks in kss)
{
ja.Add(
new JObject(
new JProperty("ID", ks["ID"].ToString()),
new JProperty("ThemeImage", ks["ThemeImage"].ToString()),
new JProperty("Sequence", ks["Sequence"].ToString()),
new JProperty("ThemeName", ks["ThemeName"].ToString())
)
);
};
}
}
catch (Exception e)
{
// LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SalesManager, "查询所有主题,error=" + e.Message, loginUserInfo);
}
return ja.ToString();
}
开发者ID:zyyecho,项目名称:venues,代码行数:30,代码来源:ThemeManager.cs
示例11: AddThemeAndSale
public static string AddThemeAndSale(int themeID, int saleID, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
if (saleID != 0)
{
tbl_theme_salespage tva = new tbl_theme_salespage();
tva.ThemeID = themeID;
tva.SalePageID = saleID;
db.AddTotbl_theme_salespage(tva);
}
if (db.SaveChanges() != 0)
{
returnStr = KeyManager.RetrunSucceed;
}
else
{
returnStr = KeyManager.RetrunUnSucceed;
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SalesManager, "新增主题与促销页面的关联关系,themeID=" + themeID + ",saleID=" + saleID, loginUserInfo);
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SalesManager, "新增主题与促销页面的关联关系,themeID=" + themeID + ",saleID=" + saleID + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:33,代码来源:ThemeSalesManager.cs
示例12: DeleteThemeByID
public static string DeleteThemeByID(int themeId, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
if (themeId == 1)
{
returnStr = "此项为默认值,不可删除!";
}
else
{
tbl_theme bus = db.tbl_theme.First<tbl_theme>(a => a.ID.Equals(themeId));
db.DeleteObject(bus);
//删除主题关联的促销关联关系
ThemeSalesManager.DeleteThemeSalesByThemeId(themeId, loginUserInfo);
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_SalesManager, "根据促销主题id删除促销主题,themeId=" + themeId, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SalesManager, "根据促销主题id删除促销主题,themeId=" + themeId + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:35,代码来源:ThemeManager.cs
示例13: DeleteLogsByIDs
/// <summary>
/// 根据日志id列表删除日志记录
/// </summary>
/// <param name="curUserID"></param>
/// <param name="logIds"></param>
/// <returns></returns>
public static string DeleteLogsByIDs(int curUserID, String logIds, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
List<string> logslist = new List<string>(logIds.Split(','));
foreach (String clogId in logslist)
{
if (clogId != "")
{
int curlogID = int.Parse(clogId);
tbl_sys_log su = db.tbl_sys_log.First<tbl_sys_log>(a => a.Log_Id.Equals(curlogID));
db.DeleteObject(su);
}
}
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_LogsManager, "删除日志成功,logIds=" + logIds, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_LogsManager, "删除日志失败,logIds=" + logIds + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:40,代码来源:LogManager.cs
示例14: addLog
/// <summary>
/// 添加日志
/// </summary>
/// <param name="UserId">用户ID</param>
/// <returns></returns>
public static void addLog(int logTypeId, int logMenuId, string logInfo, string loginUserInfo)
{
using (venuesEntities db = new venuesEntities())
{
int userId = 0;
int usertypeId = 5;
if (loginUserInfo == "" || loginUserInfo == "{}" || loginUserInfo == null)
{
}
else
{
JObject objUser = JObject.Parse(loginUserInfo);
userId = int.Parse(objUser["curUserID"].ToString());
usertypeId = int.Parse(objUser["UserTypeId"].ToString());
}
tbl_sys_log log = new tbl_sys_log();
log.Log_TypeId = logTypeId;
log.Log_UserId = userId;
log.Log_MenuId = logMenuId;
log.Log_Info = logInfo;
log.Log_Timestamp = DateTime.Now;
log.Log_UserTypeId = usertypeId;
db.AddTotbl_sys_log(log);
db.SaveChanges();
}
}
开发者ID:zyyecho,项目名称:venues,代码行数:32,代码来源:LogManager.cs
示例15: DeleteResourceByVenueID
public static string DeleteResourceByVenueID(int veneuID, string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
if (veneuID != 0)
{
ObjectQuery<tbl_file> tva = db.tbl_file.Where("[email protected]", new ObjectParameter("v", veneuID));
ObjectResult<tbl_file> results = tva.Execute(MergeOption.NoTracking);
foreach (tbl_file item in results)
{
db.AttachTo("tbl_file", item);
db.DeleteObject(item);
};
if (db.SaveChanges() != 0)
{
returnStr = KeyManager.RetrunSucceed;
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_VenusManager, "根据场所id删除资源记录成功,veneuID=" + veneuID, loginUserInfo);
}
else
returnStr = KeyManager.RetrunUnSucceed;
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VenusManager, "根据场所id删除资源记录,veneuID=" + veneuID + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:34,代码来源:ResourceManager.cs
示例16: DeleteNewByID
public static string DeleteNewByID(int newId,string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
tbl_news bus = db.tbl_news.First<tbl_news>(a => a.ID.Equals(newId));
int pageId = int.Parse(bus.NewsPage.ToString());
db.DeleteObject(bus);
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
PageManager.DeletePageByID(pageId, loginUserInfo);
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_NewsManager, "删除新闻页面成功,newId=" + newId, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_NewsManager, "删除新闻页面,newId=" + newId + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:27,代码来源:NewsManager.cs
示例17: deleteAllAuthoriyByUserID
/// <summary>
/// 根据用户id,删除用户权限表中所有关联关系
/// </summary>
/// <param name="userID"></param>
public static string deleteAllAuthoriyByUserID(int userID, int userTypeParentId, string loginUserInfo)
{
using (venuesEntities db = new venuesEntities())
{
try
{
//ObjectQuery<tbl_sys_authority> tsus = db.tbl_sys_authority.Where("[email protected] AND [email protected]", new ObjectParameter("v", userID), new ObjectParameter("u", userTypeParentId));
string strSql = string.Format("SELECT aa.AT_Id FROM tbl_sys_authority AS aa WHERE aa.AT_UserId={0} AND aa.AT_UserTypeId={1}", userID, userTypeParentId);
ObjectQuery<DbDataRecord> results = db.CreateQuery<DbDataRecord>(strSql);
foreach (var item in results)
{
int deleteAT_Id = int.Parse(item["AT_Id"].ToString());
deleteAuthoriyByID(deleteAT_Id, loginUserInfo);
//tbl_sys_authority su = db.tbl_sys_authority.First<tbl_sys_authority>(a => a.AT_Id.Equals(deleteAT_Id));
//db.DeleteObject(su);
};
//if (db.SaveChanges() != 0)
// return "成功!";
//else
// return "不成功!";
return "成功!";
}
catch (Exception e)
{
return e.Message;
}
}
}
开发者ID:zyyecho,项目名称:venues,代码行数:35,代码来源:AuthorityManager.cs
示例18: GetNewsPageByNewsID
public static string GetNewsPageByNewsID(int NewsID, string loginUserInfo)
{
JArray ja = new JArray();
try
{
using (venuesEntities db = new venuesEntities())
{
string strSql = string.Format("SELECT tn.ID,tn.NewsAuthor,tn.NewsCreateTime,tn.NewsPage,tn.NewsSequence,tn.NewsTitle,tn.UserID,tn.SmallImage FROM tbl_news AS tn WHERE tn.ID={0}", NewsID);
ObjectQuery<DbDataRecord> kss = db.CreateQuery<DbDataRecord>(strSql);
foreach (var ks in kss)
{
int pageId = int.Parse(ks["NewsPage"].ToString());
ja.Add(
new JObject(
new JProperty("ID", ks["ID"].ToString()),
new JProperty("NewsAuthor", ks["NewsAuthor"].ToString()),
new JProperty("NewsCreateTime", ks["NewsCreateTime"].ToString()),
new JProperty("NewsPage", ks["NewsPage"].ToString()),
new JProperty("NewsTitle", ks["NewsTitle"].ToString()),
new JProperty("SmallImage", ks["SmallImage"].ToString()),
new JProperty("UserID", ks["UserID"].ToString())
)
);
}
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_NewsManager, "根据NewsID获取该新闻页面信息,错误信息:" + e.Message, loginUserInfo);
}
return ja.ToString();
}
开发者ID:zyyecho,项目名称:venues,代码行数:34,代码来源:NewsManager.cs
示例19: GetPageContentByPageId
public static string GetPageContentByPageId(int pageId, string loginUserInfo)
{
JArray ja = new JArray();
try
{
using (venuesEntities db = new venuesEntities())
{
string strSql = string.Format("SELECT tpc.ContentSequence,tpc.ContentValue,tpc.ID,tpc.ModuleID,tpc.PageID,tpc.TemplateID ,tm.ModuleType FROM tbl_page_content AS tpc LEFT JOIN tbl_module AS tm ON tm.ID=tpc.ModuleID WHERE tpc.PageID= {0}", pageId);
ObjectQuery<DbDataRecord> kss = db.CreateQuery<DbDataRecord>(strSql);
string path = System.Configuration.ConfigurationManager.AppSettings["FilePath"].ToString();
foreach (var ks in kss)
{
ja.Add(
new JObject(
new JProperty("ID", ks["ID"].ToString()),
new JProperty("ContentSequence", ks["ContentSequence"].ToString()),
new JProperty("ContentValue", ks["ContentValue"].ToString()),
new JProperty("FileNameServer", ks["ContentValue"].ToString()),
new JProperty("ModuleID", ks["ModuleID"].ToString()),
new JProperty("ModuleTypeID", ks["ModuleType"].ToString()),
new JProperty("PageID", ks["PageID"].ToString()),
new JProperty("TemplateID", ks["TemplateID"].ToString())
// new JProperty("FilePathAddress", path)
)
);
};
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_PagesManager, "根据pageId获取该页面内容信息:" + e.Message, loginUserInfo);
}
return ja.ToString();
}
开发者ID:zyyecho,项目名称:venues,代码行数:35,代码来源:PageContentManager.cs
示例20: DeleteSalesPageByID
public static string DeleteSalesPageByID(int saleId,string loginUserInfo)
{
string returnStr = "";
try
{
using (venuesEntities db = new venuesEntities())
{
tbl_sales bus = db.tbl_sales.First<tbl_sales>(a => a.ID.Equals(saleId));
int pageId = int.Parse(bus.SalesPageID.ToString());
db.DeleteObject(bus);
if (db.SaveChanges() != 0)
{
returnStr = "成功!";
PageManager.DeletePageByID(pageId, loginUserInfo);//同时删除page表中的促销页信息
ThemeSalesManager.DeleteThemeSalesBySaleId(saleId, loginUserInfo);//同时删除主题与该促销页的关联关系
LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_SalesManager, "根据促销id删除促销页面记录,saleId=" + saleId, loginUserInfo);
}
else
returnStr = "不成功!";
}
}
catch (Exception e)
{
LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SalesManager, "根据促销id删除促销页面记录,saleId=" + saleId + ";错误信息:" + e.Message, loginUserInfo);
}
return returnStr;
}
开发者ID:zyyecho,项目名称:venues,代码行数:28,代码来源:SalesPageManager.cs
注:本文中的WebService.venuesEntities类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论