Пример #1
0
        public virtual void Validate(FeedTransformationState item)
        {
            string strMsg = string.Empty;

            if (item.FeedId <= 0)
            {
                strMsg += "Feedi Id nao pode ser menor ou igual a zero." + Environment.NewLine;
            }

            if (String.IsNullOrEmpty(item.OriginalValue))
            {
                strMsg += "Original Value nao pode ser nulo." + Environment.NewLine;
            }

            if (String.IsNullOrEmpty(item.OriginalColumn))
            {
                strMsg += "Original Column nao pode ser nulo." + Environment.NewLine;
            }

            if (String.IsNullOrEmpty(item.NewValue))
            {
                strMsg += "New Value nao pode ser nulo." + Environment.NewLine;
            }

            if (String.IsNullOrEmpty(item.NewColumn))
            {
                strMsg += "New Column nao pode ser nulo." + Environment.NewLine;
            }

            if (strMsg != string.Empty)
            {
                throw new TebaldiMarketDataException(strMsg);
            }
        }
Пример #2
0
        public int Delete(FeedTransformationState transform)
        {
            IDbCommand cmd;
            string     strSql;

            strSql = "DELETE FROM " + transform.Schema.ObjectName + " WHERE " + transform.Schema.TransformationId + "=" + transform.TransformationId.ToString();

            cmd             = DataLayer.CreateCommand(strSql, mstrConnectString);
            cmd.CommandType = CommandType.Text;

            return(DataLayer.ExecuteSQL(cmd));
        }