private void FillWcDriverTruckInf()
 {
     try
     {
         if (TxtTruckDriverNationalCode.Text == String.Empty)
         {
             return;
         }
         R2StandardDriverTruckStructure NSS = null;
         var InstacneLogin        = new ATISWebMClassLoginManager();
         var InstanceTruckDrivers = new R2CoreTransportationAndLoadNotificationInstanceTruckDriversManager();
         try
         {
             NSS = PayanehClassLibraryMClassDriverTrucksManagement.GetNSSDriverTruckbyNationalCode(TxtTruckDriverNationalCode.Text);
             _WcNSSTruckDriver = InstanceTruckDrivers.GetNSSTruckDriver(Convert.ToInt64(NSS.NSSDriver.nIdPerson));
         }
         catch (DriverTruckInformationNotExistException ex)
         {
             PayanehWebService WS = new PayanehWebService();
             var TruckDriverId    = WS.WebMethodGetDriverTruckByNationalCodefromRMTO(TxtTruckDriverNationalCode.Text, WS.WebMethodLogin(InstacneLogin.GetNSSCurrentUser().UserShenaseh, InstacneLogin.GetNSSCurrentUser().UserPassword));
             _WcNSSTruckDriver = InstanceTruckDrivers.GetNSSTruckDriver(TruckDriverId);
             WS = null;
         }
     }
     catch (Exception ex) when(ex is SqlInjectionException || ex is RMTOWebServiceSmartCardInvalidException || ex is InternetIsnotAvailableException || ex is RMTOWebServiceSmartCardInvalidException)
     {
         throw ex;
     }
     catch (PleaseReloginException ex)
     { Response.Redirect("/LoginManagement/Wflogin.aspx"); }
     catch (Exception ex)
     { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "." + ex.Message); }
 }
 private void BtnGetTruckDriverSmartCardInfoFromRMTO_Click(object sender, EventArgs e)
 {
     try
     {
         LblTruckDriver.Text = string.Empty;
         R2StandardDriverTruckStructure NSS = PayanehClassLibraryMClassDriverTrucksManagement.GetDriverTruckfromRMTOAndInsertUpdateLocalDataBase(TxtTruckDriverSmartCardNo.Text);
         LblTruckDriver.Text = NSS.NSSDriver.StrPersonFullName.Trim();
     }
     catch (Exception ex)
     { LblMessage.Text = ex.Message; }
 }