public void CustomerHasOperatorAlert() { try { using (_customerModel = new CustomerModel()) { CS_Customer customer = _customerModel.GetCustomerById(_view.CustomerId); if (null != customer && customer.OperatorAlert.HasValue && customer.OperatorAlert.Value) _view.OperatorAlertMessage = "Operator Alert: " + customer.AlertNotification; else _view.OperatorAlertMessage = ""; } } catch (Exception ex) { if (null != ex.InnerException) Logger.Write(string.Format("An error has occurred while trying to check if the customer is collection\n{0}\n{1}\n{2}\n{3}", ex.Message, ex.StackTrace, ex.InnerException.Message, ex.InnerException.StackTrace)); else Logger.Write(string.Format("An error has occurred while trying to check if the customer is collection\n{0}\n{1}", ex.Message, ex.StackTrace)); } }
public void CustomerIsCollection() { try { using (_customerModel = new CustomerModel()) { CS_Customer customer = _customerModel.GetCustomerById(_view.CustomerId); if (null != customer) _view.IsCostumerCollection = customer.IsCollection; else _view.IsCostumerCollection = false; } } catch (Exception ex) { if (null != ex.InnerException) Logger.Write(string.Format("An error has occurred while trying to check if the customer is collection\n{0}\n{1}\n{2}\n{3}", ex.Message, ex.StackTrace, ex.InnerException.Message, ex.InnerException.StackTrace)); else Logger.Write(string.Format("An error has occurred while trying to check if the customer is collection\n{0}\n{1}", ex.Message, ex.StackTrace)); } }