Ejemplo n.º 1
0
        public void Init(BaseLoadFilter fl)
        {
            SysAuditFilter flt = fl as SysAuditFilter;

            if (flt != null)
            {
                cmbTable.SelectedText      = flt.Tbl;
                ctlFilterID.Value          = flt.ID;
                ctlFilterUser.Value        = flt.User;
                ctlFilterHost.Value        = flt.Host;
                ctlFilterApplication.Value = flt.Application;
                ctlFilterServer.Value      = flt.Server;
                ctlFilterBase.Value        = flt.Base;
            }
            else
            {
                ResetToDefault();
            }
        }
Ejemplo n.º 2
0
        public BaseLoadFilter GetFilter()
        {
            SysAuditFilter flt = new SysAuditFilter();

            flt.DateFrom = ctlFilterDate.DateFrom;
            flt.DateTo   = ctlFilterDate.DateTo;

            flt.Tbl = (string)cmbTable.SelectedItem;
            if (string.IsNullOrEmpty(flt.Tbl))
            {
                flt.Tbl = cmbTable.Text;
            }

            flt.ID          = ctlFilterID.Value;
            flt.User        = ctlFilterUser.Value;
            flt.Host        = ctlFilterHost.Value;
            flt.Application = ctlFilterApplication.Value;
            flt.Server      = ctlFilterServer.Value;
            flt.Base        = ctlFilterBase.Value;

            return(flt);
        }