예제 #1
0
        public List <AuditAccountType> GetAccountsTypeData()
        {
            List <AuditAccountType> accountTypesData = new List <AuditAccountType>();

            try
            {
                var       database        = SingletonDb.Instance.GetDBConnection();
                object[]  parameterValues = new object[] { };
                DbCommand cmd             = database.GetStoredProcCommand("dbo.AccountType_sp_Select", parameterValues);

                using (IDataReader reader = database.ExecuteReader(cmd))
                {
                    while (reader.Read())
                    {
                        AuditAccountType accountTypeInfo = new AuditAccountType();
                        accountTypeInfo.AccountId       = reader.GetInt32(0);
                        accountTypeInfo.AccountTypeCode = !reader.IsDBNull(reader.GetOrdinal("vc_AccountTypeCode")) ? reader.GetString(1) : string.Empty;
                        accountTypeInfo.AccountType     = !reader.IsDBNull(reader.GetOrdinal("vc_AccountType")) ? reader.GetString(2) : string.Empty;
                        accountTypeInfo.Limit           = !reader.IsDBNull(reader.GetOrdinal("dc_LimitAmount")) ? reader.GetString(3) : string.Empty;
                        accountTypesData.Add(accountTypeInfo);
                    }
                }
            }
            catch (Exception ex)
            {
            }

            return(accountTypesData);
        }
예제 #2
0
 public void AddAuditAccountType(AuditAccountType accountType)
 {
     try
     {
         var       database        = SingletonDb.Instance.GetDBConnection();
         object[]  parameterValues = new object[] { accountType.AccountType, accountType.AccountTypeCode, accountType.Limit };
         DbCommand cmd             = database.GetStoredProcCommand("dbo.AccountType_sp_Insert", parameterValues);
         database.ExecuteNonQuery(cmd);
     }
     catch (Exception ex)
     {
     }
 }
예제 #3
0
        public void AddAuditAccountType(AuditAccountType accountType)
        {
            AuditDetailsDal auditDetails = new AuditDetailsDal();

            auditDetails.AddAuditAccountType(accountType);
        }