private void btnLoad_Click(object sender, EventArgs e) { try { _businessLogService = new BusinessLogService(); List <BusinessLog> input; if (rbDate.Checked) { var selectedDate = dtpDate.Value; input = _businessLogService.GetLoggingByDate(selectedDate.Day, selectedDate.Month, selectedDate.Year); LoadDGV(input); } else if (rbMonth.Checked) { var selectedDate = dtpDate.Value; input = _businessLogService.GetLoggingByMonth(selectedDate.Month, selectedDate.Year); LoadDGV(input); } } catch (Exception ex) { throw; } finally { _businessLogService = null; } }
public static void LogBusiness(string content, int type) { BusinessLogService businessLogService = new BusinessLogService(); businessLogService.Log(new DataService.Model.BusinessLog() { Content = content, ActorId = Session.GetId(), TypeId = type, DateAct = Utilities.GetServerDateTimeNow() }); }