예제 #1
0
 public void posLogView_GetPosLogEvent(object sender, PosLogEventArgs e)
 {
     if (e.PosLogId > 0)
     {
         e.PosLog = PosLogLogic.FindById(e.PosLogId);
     }
 }
예제 #2
0
 private void posLogView_SearchPosLogEvent(object sender, PosLogEventArgs e)
 {
     var criteria = new ObjectCriteria();
     if(!string.IsNullOrEmpty(e.Username))
     {
         criteria.AddLikeCriteria("PosUser", e.Username + "%");
     }
     if(!string.IsNullOrEmpty(e.Action))
     {
         criteria.AddLikeCriteria("PosAction", e.Action + "%");
     }
     criteria.AddGreaterOrEqualsCriteria("Date", DateUtility.ZeroTime(e.LogDateFrom));
     criteria.AddLesserOrEqualsCriteria("Date", DateUtility.MaxTime(e.LogDateTo));
     criteria.AddOrder("Date", false);
     IList list = PosLogLogic.FindAll(criteria);
     e.PosLogList = list;
 }
예제 #3
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            var eventArgs = new PosLogEventArgs
                                {
                                    LogDateFrom = chkImportDateFrom.Checked ? dtpImportDateFrom.Value : DateTime.MinValue,
                                    LogDateTo = chkImportDateTo.Checked ? dtpImportDateTo.Value : DateTime.MaxValue,
                                    Username = txtUsername.Text
                                };
            EventUtility.fireEvent(SearchPosLogEvent, this, eventArgs);
            PosLogList = eventArgs.PosLogList;

            posLogBindingSource.DataSource = PosLogList;
            _currentEventArgs = eventArgs;
        }