示例#1
0
        public Task <int> PostAnnualIncomeCurrency(AnnualIncomeCurrency annualIncomeCurrency)
        {
            int results = 0;

            try
            {
                using (IDbConnection db = GetConnection())
                {
                    db.Open();

                    var p = new DynamicParameters();

                    p.Add("@AnnualIncomeCurrencyId", annualIncomeCurrency.AnnualIncomeCurrencyId, DbType.Int32, ParameterDirection.Input);
                    p.Add("@AnnualIncomeCurrencyName", annualIncomeCurrency.AnnualIncomeCurrencyName, DbType.String, ParameterDirection.Input);
                    p.Add("@AnnualIncomeCreatedDate", annualIncomeCurrency.AnnualIncomeCreatedDate, DbType.DateTime, ParameterDirection.Input);
                    p.Add("@AnnualIncomeCreatedBy", annualIncomeCurrency.AnnualIncomeCreatedBy, DbType.Int32, ParameterDirection.Input);
                    p.Add("@AnnualIncomeModifiedDate", annualIncomeCurrency.AnnualIncomeModifiedDate, DbType.DateTime, ParameterDirection.Input);
                    p.Add("@@AnnualIncomeModifiedBy", annualIncomeCurrency.AnnualIncomeModifiedBy, DbType.Int32, ParameterDirection.Input);
                    p.Add("@AnnualIncomeStatus", annualIncomeCurrency.AnnualIncomeStatus, DbType.Int32, ParameterDirection.Input);

                    if (annualIncomeCurrency.AnnualIncomeCurrencyId == 0)
                    {
                        p.Add("@ActionType", ActionType.Add.ToString(), DbType.String, ParameterDirection.Input);
                    }
                    else
                    {
                        p.Add("@ActionType", ActionType.Update.ToString(), DbType.String, ParameterDirection.Input);
                    }

                    p.Add("@OutputData", annualIncomeCurrency.AnnualIncomeCurrencyId, DbType.Int32, ParameterDirection.Input);

                    results = db.Execute("usp_CRED_AnnualIncomeCurrency", p, commandType: CommandType.StoredProcedure);
                }
                return(Task.FromResult(results));
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
 public Task <int> PostAnnualIncomeCurrency(AnnualIncomeCurrency annualIncomeCurrency)
 {
     return(annualIncomeCurrencyServiceobj.PostAnnualIncomeCurrency(annualIncomeCurrency));
 }
 public Task <int> PostAnnualIncomeCurrency(AnnualIncomeCurrency annualIncomeCurrency)
 {
     return(annualIncomeCurrencyRepositoryobj.PostAnnualIncomeCurrency(annualIncomeCurrency));
 }