Exemplo n.º 1
0
    private void setLogOut()
    {
        tblUserLog objUserLog = new tblUserLog();

        objUserLog.LoadByPrimaryKey((int)Session[appFunctions.Session.UserLogID.ToString()]);
        if (objUserLog.RowCount > 0)
        {
            objUserLog.AppLogOutDate = DateTime.Now;
            objUserLog.Save();
            objUserLog = null;
        }
        Session[appFunctions.Session.UserLogID.ToString()] = "";
    }
Exemplo n.º 2
0
    //protected void btnCancel_Click(object sender, System.EventArgs e)
    //{
    //    Response.Redirect("Default.aspx");
    //}


    protected void SaveLog(bool IsSuccess)
    {
        objUserLog = new tblUserLog();
        objUserLog.AddNew();

        if (Session[appFunctions.Session.UserID.ToString()] != null)
        {
            objUserLog.AppUserID = (int)Session[appFunctions.Session.UserID.ToString()];
        }

        objUserLog.AppLogInDate  = DateTime.Now;
        objUserLog.AppIPAddress  = Request.UserHostAddress.ToString();
        objUserLog.AppIsSuccess  = IsSuccess;
        objUserLog.AppLogOutDate = DateTime.Now;
        objUserLog.Save();
        Session[appFunctions.Session.UserLogID.ToString()] = objUserLog.AppUserLogID;
        objUserLog = null;
    }