void ProcessCommand_Executed(object obj)
 {
     CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     try
     {
         StorageVehicleOutgateProp objData = new StorageVehicleOutgateProp();
         StorageVehicleOutgateProp objStorageVehicleOutgateProp = new StorageVehicleOutgateProp();
         objStorageVehicleOutgateProp.Vin     = VIN;
         objStorageVehicleOutgateProp.DateOut = DtDateOut;
         objStorageVehicleOutgateProp.Note    = string.Empty;
         objStorageVehicleOutgateProp.User    = userCode;
         objData = _serviceInstance.UpdateStorageVehicleOutgateData(objStorageVehicleOutgateProp);
         {
             if (objData != null)
             {
                 if (objData.ReturnCode == 0)
                 {
                     MessageBox.Show(Resources.msgSecurity, Resources.msgTitleMessageBoxSecurity);
                 }
                 else
                 {
                     MessageBox.Show(Resources.msgErrorSecurity + objData.ReturnMessage, Resources.msgTitleMessageBoxErrorSecurity);
                 }
                 HelpMessage = Resources.msgSecurityVEHICLEScan;
                 Background  = new SolidColorBrush(Colors.Blue);
                 VIN         = null;
                 GatePass    = null;
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.LogErrorToDb(ex);
         bool displayErrorOnUI = false;
         CommonSettings.logger.LogError(this.GetType(), ex);
         if (displayErrorOnUI)
         {
             throw;
         }
     }
     finally
     {
         CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
     }
 }
Example #2
0
        /// <summary>
        /// This method is used to Storage Vehicle Outgate for security.
        /// </summary>
        /// <param name="objStorageVehicleOutgateProp"></param>
        /// <returns></returns>
        /// <createdBy></createdBy>
        /// <createdOn>July 7, 2016</createdOn>
        public StorageVehicleOutgateProp UpdateStorageVehicleOutgateData(StorageVehicleOutgateProp objStorageVehicleOutgateProp)
        {
            VehicleDAL objVehicleDAL = new VehicleDAL();

            CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "Called {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            try
            {
                //Calling Insert PortStorage Vehicle Outgate Details Method.
                return(objVehicleDAL.UpdateStorageVehicleOutgateData(objStorageVehicleOutgateProp));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                CommonDAL.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, "End {2} function ::{0} {1}.", DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name));
            }
        }