本文整理汇总了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;
}
示例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;
}