예제 #1
0
        protected void saveData(CommandEvent evt)
        {
            List<Filter> list = new List<Filter>();
            foreach(DataGridViewRow row in dgvCEFilters.Rows)
            {
                if(row.IsNewRow) {
                    continue;
                }

                list.Add(new Filter()
                {
                    Guid        = (string)row.Cells[dgvCEFiltersColumnGuid.Name].Value,
                    CustomIn    = (string)row.Cells[dgvCEFiltersColumnCustomIn.Name].Value,
                    CustomOut   = (string)row.Cells[dgvCEFiltersColumnCustomOut.Name].Value,
                    Description = (string)row.Cells[dgvCEFiltersColumnDescription.Name].Value,
                    Id          = Convert.ToInt32(row.Cells[dgvCEFiltersColumnId.Name].Value),
                    Cancel      = Convert.ToBoolean(row.Cells[dgvCEFiltersColumnCancel.Name].Value),
                    Pre         = Convert.ToBoolean(row.Cells[dgvCEFiltersColumnPre.Name].Value),
                    Post        = Convert.ToBoolean(row.Cells[dgvCEFiltersColumnPost.Name].Value),
                });
            }
            evt.Filters = list.ToArray();
        }
예제 #2
0
 protected void commandEvent(CommandEvent item)
 {
     try
     {
         if(cmd.exec(item, SolutionEventType.CommandEvent)) {
             Log.Info("[CommandEvent] finished: '{0}'", item.Caption);
         }
         Status._.add(SolutionEventType.CommandEvent, StatusType.Success);
     }
     catch(Exception ex) {
         Log.Error("CommandEvent error: '{0}'", ex.Message);
     }
     Status._.add(SolutionEventType.CommandEvent, StatusType.Fail);
 }
예제 #3
0
 protected void renderData(CommandEvent evt)
 {
     dgvCEFilters.Rows.Clear();
     if(evt.Filters == null) {
         return;
     }
     foreach(IFilter f in evt.Filters) {
         dgvCEFilters.Rows.Add(f.Guid, f.Id, f.CustomIn, f.CustomOut, f.Description, f.Cancel, f.Pre, f.Post);
     }
 }