Ejemplo n.º 1
0
        /// <summary>
        /// Save error log with Global UserID and Current Datetime value
        /// </summary>
        /// <param name="ErrorLocation">String Form Name+Fuction Name </param>
        /// <param name="ErrorDesc">String error string</param>
        /// <returns>Boolean true if log saved else false</returns>
        public static Boolean save(string ErrorLocation, string ErrorDesc)
        {
            Boolean _return = false;

            try
            {
                List <cstErrorLog> _lsErrorCustom = new List <cstErrorLog>();
                cstErrorLog        _error         = new cstErrorLog();
                _error.ErrorLogID    = Guid.Empty;
                _error.ErrorLocation = "PackingCustom." + ErrorLocation;
                _error.ErrorDesc     = ErrorDesc;
                _error.ErrorTime     = DateTime.UtcNow;
                _error.UserID        = Guid.Empty;
                _lsErrorCustom.Add(_error);
                cmdErrorLog _Error = new cmdErrorLog();
                _return = _Error.SaveLog(_lsErrorCustom);
            }
            catch (Exception)
            {
            }
            return(_return);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Save Error log
        /// </summary>
        /// <param name="lsErrorlog">detail error log info</param>
        /// <returns>Boolean Value</returns>
        public Boolean SaveErrorlog(List <cstErrorLog> lsError)
        {
            cmdErrorLog command = new cmdErrorLog();

            return(command.SaveLog(lsError));
        }