當前位置: 首頁>>代碼示例>>C#>>正文


C# venuesEntities.AddTotbl_sys_businessman方法代碼示例

本文整理匯總了C#中WebService.venuesEntities.AddTotbl_sys_businessman方法的典型用法代碼示例。如果您正苦於以下問題:C# venuesEntities.AddTotbl_sys_businessman方法的具體用法?C# venuesEntities.AddTotbl_sys_businessman怎麽用?C# venuesEntities.AddTotbl_sys_businessman使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WebService.venuesEntities的用法示例。


在下文中一共展示了venuesEntities.AddTotbl_sys_businessman方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddBusinessman

        public static string AddBusinessman(int curUserId, string bs_LoginName, int bs_TypeId, string bs_Name, string bs_Contact, string loginUserInfo)
        {
            string returnStr = "";
            string logInfo = "";
            try
            {
                using (venuesEntities db = new venuesEntities())
                {
                    string sysUserReturnStr = UserManager.SaveUser(curUserId, bs_LoginName, bs_Name, KeyManager.UserTypeId_BuissiensUser, loginUserInfo);

                    if (sysUserReturnStr.Equals(KeyManager.RetrunSucceed))
                    {
                        tbl_sys_businessman buss = new tbl_sys_businessman();
                        //buss.Businessman_LoginName = bs_LoginName;
                        //buss.Businessman_TypeID = bs_TypeId;
                        //buss.Businessman_Name = bs_Name;
                        //buss.Businessman_Password = KeyManager.Default_Pwd;
                        //buss.Businessman_ContactPhone = bs_Contact;
                        db.AddTotbl_sys_businessman(buss);
                        logInfo = "Businessman_LoginName=" + bs_LoginName + ",Businessman_TypeID=" + bs_TypeId + ",Businessman_Name=" + bs_Name + ",Businessman_Password = " + KeyManager.Default_Pwd + ",Businessman_ContactPhone = " + bs_Contact;
                        if (db.SaveChanges() != 0)
                        {
                            returnStr = "成功!";
                        }
                        else
                            returnStr = "不成功!";
                    }
                    else
                    {
                        returnStr = sysUserReturnStr;
                    }
                }
            }
            catch (Exception e)
            {
                LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_SystemUsersManager, "新增用戶," + logInfo + ",錯誤信息:" + e.Message, loginUserInfo);
            }
            LogManager.addLog(KeyManager.LogTypeId_Option, KeyManager.MENUS.Menu_SystemUsersManager, "新增用戶," + logInfo, loginUserInfo);
            return returnStr;
        }
開發者ID:zyyecho,項目名稱:venues,代碼行數:40,代碼來源:BusinessmanManager.cs

示例2: SaveVenues

        public static string SaveVenues(int curUserId, string venueInfo, string loginUserInfo)
        {
            string returnStr = "";
            JObject objVenue = JObject.Parse(venueInfo);
            try
            {
                using (venuesEntities db = new venuesEntities())
                {
                    string saveUserReturn = UserManager.SaveUser(curUserId, objVenue["loginName"].ToString(), objVenue["venueName"].ToString(), int.Parse(objVenue["venueTypeID"].ToString()), loginUserInfo);

                    if (saveUserReturn.Equals(KeyManager.RetrunSucceed))
                    {
                        tbl_sys_businessman bus = new tbl_sys_businessman();
                        bus.Business_Name=objVenue["venueName"].ToString();
                        bus.Business_Address=objVenue["address"].ToString();
                        bus.Business_TypeID=int.Parse(objVenue["venueTypeID"].ToString());
                        bus.Business_ContactPerson = objVenue["contactPeople"].ToString();
                        bus.Business_North = objVenue["site_North"].ToString();
                        bus.Business_East = objVenue["site_East"].ToString();
                        bus.Business_Email = objVenue["email"].ToString();
                        bus.Business_ContactPhone= objVenue["phone"].ToString();
                        bus.Business_PayTypeID = int.Parse(objVenue["payType"].ToString());
                        bus.Business_WebSite = objVenue["website"].ToString();
                        bus.Business_PostalCode = objVenue["postcode"].ToString();
                        bus.Business_Fax = objVenue["fax"].ToString();

                        db.AddTotbl_sys_businessman(bus);
                        if (db.SaveChanges() != 0)
                        {
                            returnStr = KeyManager.RetrunSucceed;
                        }
                        else
                        {
                            returnStr = KeyManager.RetrunUnSucceed;
                        }

                    }
                    else
                    {
                        returnStr = saveUserReturn;
                    }
                }
            }
            catch (Exception e)
            {
                LogManager.addLog(KeyManager.LogTypeId_Error, KeyManager.MENUS.Menu_VenusManager, "新增場所成功,venuesinfo=" + venueInfo + ";錯誤信息:" + e.Message, loginUserInfo);
            }

            return returnStr;
        }
開發者ID:zyyecho,項目名稱:venues,代碼行數:50,代碼來源:BusinessmanManager.cs


注:本文中的WebService.venuesEntities.AddTotbl_sys_businessman方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。