/// <summary> /// Function OpenPrintDialog to open the print window /// </summary> /// <param name="obj"></param> /// <returns>NA</returns> /// <createdBy></createdBy> /// <createdOn>May-11,2016</createdOn> public void OpenPrintDialog(object obj) { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); try { DateoutProcessingModel objPrinModel = new DateoutProcessingModel(); objPrinModel.Vin = Vin; objPrinModel.VehiclesID = string.Empty; objPrinModel.BayLocation = BayLocation; PrintWindow objPrint = new PrintWindow(objPrinModel); objPrint.ShowDialog(); } 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)); } }
/// <summary> /// Constructor to get the vehicle print details. /// </summary> /// <param name="objPortStorageVehiclePrintModel"></param> /// <returns>void</returns> /// <createdBy></createdBy> /// <createdOn>May-07,2016</createdOn> public PrintVM(DateoutProcessingModel objDateoutProcessingModel) { if (objDateoutProcessingModel != null) { //PrintModule = "dateout"; PrintPSDateOut = objDateoutProcessingModel; } }
/// <summary> /// This constructor for Date out Processing Model to open print window /// </summary> /// <param name="objPortStorageVehiclePrintModel"></param> public PrintWindow(DateoutProcessingModel objPortStorageVehiclePrintModel) { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Props.Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); try { InitializeComponent(); this.DataContext = new PrintVM(objPortStorageVehiclePrintModel); } 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, Props.Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); } }