public string GetNextNumber(CompanyData company, int numberType)
        {
            Log.LogInformation("Accessing AccountRepo GetNextNumber function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@entityKey", company.CompanyKey)
            };
            var spName = "usp_get_next_emp_num";

            switch (numberType)
            {
            case 2:
                spName = "usp_get_next_emp_num";
                break;

            case 1:
                spName = "usp_get_next_acct_num";
                break;

            case 6:
                spName = "usp_get_next_vend_num";
                break;

            default:
                return("usp_get_next_emp_num");
            }
            using (entityContext) return(entityContext.ExecuteSqlStatementAsScalar <string>(spName, pcol));
        }
        public string GetNextNumber(AccountData account, int entityDesc)
        {
            Log.LogInformation("Accessing AccountRepo GetNextNumber function");
            var pcol = new List <SqlParameter>()
            {
                Mapper.BuildParam("@entityKey", account.AccountKey)
            };
            var spName = "usp_get_next_order_num";

            switch (entityDesc)
            {
            case 2:
                spName = "usp_get_next_order_num";
                break;

            case 1:
                spName = "usp_get_next_invoice_num";
                break;

            case 6:
                spName = "usp_get_next_contact_num";
                break;

            default:
                return("usp_get_next_order_num");
            }
            using (entityContext) return(entityContext.ExecuteSqlStatementAsScalar <string>(spName, pcol));
        }