Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Random generator*/
- http://www.codeproject.com/Articles/14403/Generating-Unique-Keys-in-Net
- update history=>>>>>
- protected Boolean UpdateLoginsHistory()
- {
- Int32 i32RetVal = 0;
- try
- {
- SQLDatabase DBConnection = new SQLDatabase(ConfigurationManager.ConnectionStrings["dbConnectionString"].ToString());
- if( DBConnection == null )
- throw new NullReferenceException();
- DBConnection.Connect();
- LoginDB Function = new LoginDB( DBConnection );
- if( Function == null )
- throw new NullReferenceException();
- //Function.UpdateLoginsHistory( Context.User.Identity.Name, Context.User.Identity.Name, ref i32RetVal );
- Function.UpdateLoginsHistory( Session["LoginUserName"].ToString(), Session["LoginUserName"].ToString(), ref i32RetVal );
- if( i32RetVal < 0 )
- return false;
- DBConnection.Disconnect();
- }
- catch( SQLException Ex )
- {
- ERP.Global.ErrorMessage( Ex, Context );
- return false;
- }
- catch( NullReferenceException Ex )
- {
- ERP.Global.ErrorMessage( Ex, Context );
- return false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement