Out of sheer curiosity. Hope none of you NDAs are violated or whatever.
Here are mine. I'm currently refactoring a massively coupled webapp. As it usually is, no comments and no documentation whatsoever.
if (paymentMethod == PaymentMethod.InAgency )
{
EmailController.SendBookingCreateEmails(booking);
this.DC.SubmitChanges();
return RedirectToAction("Result", new { id = booking.Id });
}
else if (paymentMethod == PaymentMethod.CreditCard)
{
return RedirectToAction("Pay", new { id = booking.Id });
}
else if(paymentMethod == PaymentMethod.MostravelBank || paymentMethod == PaymentMethod.MostravelCallback ||
paymentMethod == PaymentMethod.MostravelCardCredit || paymentMethod == PaymentMethod.MostravelCourierCash ||
paymentMethod == PaymentMethod.MostravelCourierPlasticCard)
{
isExclusive = true;
Log.TraceInformation("Started booking for Mostravel. Payment method: {0}", paymentMethod);
try
{
Log.TraceInformation("Sending emails");
EmailController.SendBookingCreateEmailsEx(booking);
Log.TraceInformation("Sent emails. Started booking");
MakeRealBooking(booking, DC.MailRuAgencies.First(a => a.Id == MvcApplication.DefaultMailRuAgencyId));
Log.TraceInformation("Finished booking");
}
catch(Exception ex)
{
Log.TraceEvent(TraceEventType.Error, 0, "Error while booking: {0}", ex.ToString());
}
What are you working on right now?