本文整理匯總了C#中WebService.venuesEntities.AddTotbl_sys_log方法的典型用法代碼示例。如果您正苦於以下問題:C# venuesEntities.AddTotbl_sys_log方法的具體用法?C# venuesEntities.AddTotbl_sys_log怎麽用?C# venuesEntities.AddTotbl_sys_log使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WebService.venuesEntities
的用法示例。
在下文中一共展示了venuesEntities.AddTotbl_sys_log方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: 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();
}
}