当前位置: 首页>>代码示例>>C#>>正文


C# WebService.venuesEntities类代码示例

本文整理汇总了C#中WebService.venuesEntities的典型用法代码示例。如果您正苦于以下问题:C# venuesEntities类的具体用法?C# venuesEntities怎么用?C# venuesEntities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


venuesEntities类属于WebService命名空间,在下文中一共展示了venuesEntities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的WebService.venuesEntities类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。