示例#1
0
        public virtual int KUR_UPD(string DVZ, string BANKA, string KURAL, string KURSAT)
        {
            global::FirebirdSql.Data.FirebirdClient.FbCommand command = ((global::FirebirdSql.Data.FirebirdClient.FbCommand)(this.CommandCollection[0]));
            if ((DVZ == null))
            {
                command.Parameters[0].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[0].Value = ((string)(DVZ));
            }
            if ((BANKA == null))
            {
                command.Parameters[1].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[1].Value = ((string)(BANKA));
            }
            if ((KURAL == null))
            {
                command.Parameters[2].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[2].Value = ((string)(KURAL));
            }
            if ((KURSAT == null))
            {
                command.Parameters[3].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[3].Value = ((string)(KURSAT));
            }
            global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
            if (((command.Connection.State & global::System.Data.ConnectionState.Open)
                 != global::System.Data.ConnectionState.Open))
            {
                command.Connection.Open();
            }
            int returnValue;

            try {
                returnValue = command.ExecuteNonQuery();
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed))
                {
                    command.Connection.Close();
                }
            }
            return(returnValue);
        }
示例#2
0
        public virtual object LOGIN_PWDCHANGE(global::System.Nullable <int> USTID, string OPWD, string NPWD)
        {
            global::FirebirdSql.Data.FirebirdClient.FbCommand command = ((global::FirebirdSql.Data.FirebirdClient.FbCommand)(this.CommandCollection[1]));
            if ((USTID.HasValue == true))
            {
                command.Parameters[0].Value = ((int)(USTID.Value));
            }
            else
            {
                command.Parameters[0].Value = global::System.DBNull.Value;
            }
            if ((OPWD == null))
            {
                command.Parameters[1].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[1].Value = ((string)(OPWD));
            }
            if ((NPWD == null))
            {
                command.Parameters[2].Value = global::System.DBNull.Value;
            }
            else
            {
                command.Parameters[2].Value = ((string)(NPWD));
            }
            global::System.Data.ConnectionState previousConnectionState = command.Connection.State;
            if (((command.Connection.State & global::System.Data.ConnectionState.Open)
                 != global::System.Data.ConnectionState.Open))
            {
                command.Connection.Open();
            }
            object returnValue;

            try {
                returnValue = command.ExecuteScalar();
            }
            finally {
                if ((previousConnectionState == global::System.Data.ConnectionState.Closed))
                {
                    command.Connection.Close();
                }
            }
            if (((returnValue == null) ||
                 (returnValue.GetType() == typeof(global::System.DBNull))))
            {
                return(null);
            }
            else
            {
                return((object)(returnValue));
            }
        }