protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string cmd = Request["cmd"]; switch (cmd) { case "add": string pageName = Request["pageName"]; string pageUrl = Request["pageUrl"]; BrowsingHistoryEntity entity = new BrowsingHistoryEntity() { PageName = pageName, PageUrl = pageUrl, SystemUserSysNo = WebContext.LoginUser.SysNo, InUser = WebContext.LoginUser.UserName, InDate = DateTime.Now }; new BrowsingHistoryFacade().InsertBrowsingHistory(entity); break; case "get": break; } } }
public int UpdateBrowsingHistory(BrowsingHistoryEntity entity) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("UpdateBrowsingHistory"); command.SetParameterValue("@SysNo", entity.SysNo); command.SetParameterValue("@SystemUserSysNo", entity.SystemUserSysNo); command.SetParameterValue("@PageName", entity.PageName); command.SetParameterValue("@PageUrl", entity.PageUrl); command.SetParameterValue("@Status", entity.Status); command.SetParameterValue("@InUser", entity.InUser); command.SetParameterValue("@InDate", entity.InDate); return command.ExecuteNonQuery(); }
public int InsertBrowsingHistory(BrowsingHistoryEntity entity) { CustomDataCommand command = DataCommandManager.CreateCustomDataCommandFromConfig("InsertBrowsingHistory"); command.SetParameterValue("@SystemUserSysNo", entity.SystemUserSysNo); command.SetParameterValue("@PageName", entity.PageName); command.SetParameterValue("@PageUrl", entity.PageUrl); command.SetParameterValue("@Status", entity.Status); command.SetParameterValue("@InUser", entity.InUser); command.SetParameterValue("@InDate", entity.InDate); object obj = command.ExecuteScalar(); if (obj != null) return Convert.ToInt32(obj); else return 0; }
public int UpdateBrowsingHistory(BrowsingHistoryEntity entity) { return RestClient.Post<int>("BrowsingHistoryService/UpdateBrowsingHistory", entity); }
public int InsertBrowsingHistory(BrowsingHistoryEntity entity) { return RestClient.Post<int>("BrowsingHistoryService/InsertBrowsingHistory", entity); }
public int UpdateBrowsingHistory(BrowsingHistoryEntity entity) { return ObjectFactory<IBrowsingHistoryDataAccess>.Instance.UpdateBrowsingHistory(entity); }