public static void CheckWarning(DeleteDataDev entity)
 {
     entity.Warning.Clear();
     if (entity.DeleteMode == DeleteDataEvent.EnumDeleteDataMode.DataEntity)
     {
         DataEntity dataEntity = _dataEntityComponentService.GetDataEntity(entity.DataEntityId);
         if (dataEntity == null)
         {
             entity.Warning.AddWarningSign(entity, Language.Current.EventDev_DeleteDataDev_DataEntityNotExist);
         }
         foreach (DeleteDataEvent.WhereItem where in entity.Where)
         {
             if (dataEntity != null)
             {
                 if (dataEntity.Items.Contains(where.DataItem) == false)
                 {
                     entity.Warning.AddWarningSign(entity, Language.Current.EventDev_DeleteDataDev_DataItemEntityNotExist);
                 }
             }
             if (where.Source.Type == EnumEventDataSource.FormElement)
             {
                 if (entity.HostFormEntity.Elements.Contains(where.Source.Source) == false)
                 {
                     entity.Warning.AddWarningSign(entity, Language.Current.EventDev_DeleteDataDev_FormElementNotExist);
                 }
             }
         }
     }
 }
示例#2
0
        public override void SetParameter(EventBase even)
        {
            DeleteDataDev _event = even as DeleteDataDev;

            this.txtName.Text = _event.Name;
            this.txtCode.Text = _event.Code;
            if (_event.DeleteMode == DeleteDataEvent.EnumDeleteDataMode.DataEntity)
            {
                this.radioButtonDataEntity.Checked = true;
            }
            else
            {
                this.radioButtonSql.Checked = true;
            }
        }
示例#3
0
        public override void SetParameter(EventBase even)
        {
            DeleteDataDev _event = even as DeleteDataDev;

            this.DataEntityId = _event.DataEntityId;
            DataEntity dataEntity = _dataEntityComponentService.GetDataEntity(this.DataEntityId);

            this._wheres = new BindingList <DeleteDataEvent.WhereItem>(_event.Where);
            this._warningTable.Clear();

            //为用于显示的DataColumnName和SourceName赋值
            bool warningRow;

            foreach (DeleteDataEvent.WhereItem where in _wheres)
            {
                warningRow = false;

                //DataItemEntityDev
                DataItemEntity dataImteEntity = dataEntity.Items.GetEntityById(where.DataItem);

                if (dataImteEntity == null)
                {
                    where.DataItemName = String.Empty;
                    warningRow         = true;
                }
                else
                {
                    where.DataItemName = dataImteEntity.Name;
                }

                where.SourceName = StringParserLogic.DataSourceVisibleString(this.HostAdapter.HostFormEntity, where.Source.ToString(), out warningRow);

                this._warningTable.Add(where, warningRow);
            }

            this.dataGridViewWhere.DataSource = this._wheres;
        }
        public override void SetParameter(EventBase even)
        {
            DeleteDataDev _event = even as DeleteDataDev;

            this.txtSqlRegex.Text = _event.SqlRegex;
        }