Exemplo n.º 1
0
        public override string FormatToDatabaseEspecialValue(EspecialescargomasterNullable Value)
        {
            switch (Value)
            {
            case EspecialescargomasterNullable.DBUser:
                return("current_user");

            case EspecialescargomasterNullable.SysDate:
                return("now");

            default:
                return("");
            }
        }
Exemplo n.º 2
0
        public override string FormatToDatabaseEspecialValue(EspecialescargomasterNullable Value)
        {
            switch (Value)
            {
            case EspecialescargomasterNullable.DBUser:
                return("CURRENT_USER");

            case EspecialescargomasterNullable.SysDate:
                return("GETDATE()");

            default:
                return("");
            }
        }
Exemplo n.º 3
0
 private void SetDbNull(bool nIsDbNull)
 {
     if (nIsDbNull)
     {
         this.value      = default(T);
         this.isNull     = false;
         this.isDbNull   = true;
         this.isEspecial = false;
         this.especial   = EspecialescargomasterNullable.None;
     }
     else
     {
         this.isDbNull = false;
     }
 }
Exemplo n.º 4
0
 private void SetEspecial(bool isEspcial, EspecialescargomasterNullable nValue)
 {
     if (isEspcial)
     {
         this.value      = default(T);
         this.isNull     = false;
         this.isDbNull   = false;
         this.isEspecial = true;
         this.especial   = nValue;
     }
     else
     {
         this.isEspecial = false;
         this.especial   = EspecialescargomasterNullable.None;
     }
 }
Exemplo n.º 5
0
        private void SetValue(T nValue)
        {
// ReSharper disable ConvertConditionalTernaryToNullCoalescing
            this.value = (nValue == null) ? default(T) : nValue;
// ReSharper restore ConvertConditionalTernaryToNullCoalescing
            this.isNull   = (nValue == null);
            this.isDbNull = (nValue is DBNull);

            if (nValue is EspecialescargomasterNullable)
            {
                this.isEspecial = true;
                this.especial   = (EspecialescargomasterNullable)Enum.Parse(typeof(EspecialescargomasterNullable), nValue.ToString());
            }
            else
            {
                this.isEspecial = false;
                this.especial   = EspecialescargomasterNullable.None;
            }
        }
Exemplo n.º 6
0
        public override string FormatToDatabaseEspecialValue(EspecialescargomasterNullable Value)
        {
            switch (Value)
            {
                case EspecialescargomasterNullable.DBUser:
                    return "current_user";

                case EspecialescargomasterNullable.SysDate:
                    return "now";

                default:
                    return "";
            }
        }
Exemplo n.º 7
0
        public override string FormatToDatabaseEspecialValue(EspecialescargomasterNullable Value)
        {
            switch (Value)
            {
                case EspecialescargomasterNullable.DBUser:
                    return "CURRENT_USER";

                case EspecialescargomasterNullable.SysDate:
                    return "GETDATE()";

                default:
                    return "";
            }
        }
Exemplo n.º 8
0
        public override string FormatToDatabaseEspecialValue(EspecialescargomasterNullable nValue)
        {
            switch (nValue)
            {
                case EspecialescargomasterNullable.DBUser:
                    return "USER";

                case EspecialescargomasterNullable.SysDate:
                    return "SYSDATE";

                default:
                    return "";
            }
        }
Exemplo n.º 9
0
 public abstract string FormatToDatabaseEspecialValue(EspecialescargomasterNullable Value);
Exemplo n.º 10
0
 public cargomasterNullable(EspecialescargomasterNullable value)
 {
     SetEspecial(value != EspecialescargomasterNullable.None, value);
 }