Beispiel #1
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Item_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Item_Name":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Item_Type_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Status":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Recent_Log_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Entity_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Recent_Log_Type":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Recent_Log_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "UserId":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Action":
                parameter = _db.AddParameter(cmd, paramName, DbType.StringFixedLength, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
Beispiel #3
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "ID":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Exchange_Date":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Currency_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Exchange_Rate":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
Beispiel #4
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Company_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Company_Name":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Address":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Contact_Person":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Contact_No":
                parameter = _db.AddParameter(cmd, paramName, DbType.StringFixedLength, value);
                break;

            case "Email":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Status":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            case "IsDeleted":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "GL_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "GL_Date":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Reference":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "GL_Act_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Debit":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Credit":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Donor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Company_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
Beispiel #6
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Budget_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Year":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "GL_Act_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Amount":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Invoice_Det_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Invoice_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Item_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Price":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Quantity":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Total":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "GL_Act_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
Beispiel #8
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Payment_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Payment_Date":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Reference":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Vendor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "CashBank":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            case "ChequeNo":
                parameter = _db.AddParameter(cmd, paramName, DbType.StringFixedLength, value);
                break;

            case "Payment_Type_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Invoice_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Amount":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Donor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "GL_Act_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Currency_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Company_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Vendor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Vendor_Name":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Address":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Contact_No":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Email":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Country":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Vendor_Type_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Status":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            case "Currency_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "GL_Act_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "User_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "UserName":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "FullName":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Password":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Email":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Role_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "IsDeleted":
                parameter = _db.AddParameter(cmd, paramName, DbType.Boolean, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }
Beispiel #11
0
        /// <summary>
        /// Adds a new parameter to the specified command.
        /// </summary>
        /// <param name="cmd">The <see cref="System.Data.IDbCommand"/> object to add the parameter to.</param>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <returns>A reference to the added parameter.</returns>
        protected virtual IDbDataParameter AddParameter(IDbCommand cmd, string paramName, object value)
        {
            IDbDataParameter parameter;

            switch (paramName)
            {
            case "Invoice_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Invoice_No":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Invoice_Date":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Vendor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Reference":
                parameter = _db.AddParameter(cmd, paramName, DbType.StringFixedLength, value);
                break;

            case "Purchase_No":
                parameter = _db.AddParameter(cmd, paramName, DbType.String, value);
                break;

            case "Gross_Total":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Discount":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Net_Total":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Donor_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Company_Id":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Created_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            case "Updated_By":
                parameter = _db.AddParameter(cmd, paramName, DbType.Int32, value);
                break;

            case "Updated_Time":
                parameter = _db.AddParameter(cmd, paramName, DbType.DateTime, value);
                break;

            default:
                throw new ArgumentException("Unknown parameter name (" + paramName + ").");
            }
            return(parameter);
        }