Can't Get Test Module To Return Salary Cannot Be Negative
Jan 31, 2010
Below is my code for an employee class and employeetest module. Im not sure why i cant get the test module to return Salary cannot be negative with i put in a number less than zero and not sure how to get monthly salary to convert to yearly and then giving a 10% raise.[code]
View 4 Replies
ADVERTISEMENT
Sep 18, 2009
I am looking for a way to test an integer value to see if it is positive or negative so I can perform the required actions.
View 1 Replies
Jun 24, 2010
I am trying to return to a module from a userform and I cannot figure out how to do it. My program is set up so that the module will call userforms at various times to collect/display information but then I want to return to the module after each userform has done its job, and I want to return to the next line of code in the module.[code]
View 2 Replies
Jul 16, 2010
I'm on my way to MSDN but thought I'd stop by here first because the answers are usually more cogent.I have a test bed that mimmicks my product app. The general architecture is a factory that builds/instantiates a number of objects (device controllers) that are scalable in number based on requirement. Each object has a threaded portion that reads a device. This way, each object can read its own device simultaneously with all the others. To perform the read, the object calls a routine in a Module that houses the device interfaces. Interestingly (and happily), it seems like each thread has its own copy of the Module routine.
The test bed seems to verify what I'm seeing in the app. In the testbed, a 500 mil second delay is substituted for the device call. Even enclosing the test module portion that hosts the delay in a Synclock results in multi-threaded execution of the pseudo device call. I haven't tested for data yet, but this seems to indicate that when the module routine is called from controller object, it too carries it's own copy of the data just like the calling object. As a long time c++ programmer...that don't quite seem right.
View 2 Replies
Dec 9, 2009
These two TimeSpan are stored in the Database with 24hr format. No date, only TimeSpan.
Dim r As TimeSpan
Dim tsStart As TimeSpan
Dim tsEnd As TimeSpan
[Code]...
Is there any TimeSpan method to get this right?
View 3 Replies
Sep 14, 2009
I have this light sensor circuit that will return positive voltage or negative voltage. I want to plug it into the 9-pin D-Sub port on my computer. I already have a male connector. How do I connect the circuit to the D-Sub connector, and how do I read the value and convert it to a Boolean in a program? How do I set up the cables? It only returns one 1 or 0 value. Is it possible, even?
View 17 Replies
Mar 28, 2011
A company pays its salespeople on a commission basis. The salespeople receive $200 per week, plus 9% of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9% of $5000, or a total of $650. Develop a console program (using a one-dimensional array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson?s salary is truncated to an integer amount):
a)$200-$299
$300-$399
c)$400-$499
[code]....
My gross salary formula works fine but im confused about my For Next Statement. Not sure if im doing it right. i forgot one thing.... i'm not sure if my increment counter should be where i put it. I think it needs to be in my for next statement?
View 9 Replies
Feb 1, 2011
I'm new with VB programming and would like to know if anyone can look/test this code I have written. I don't have the ability to test right now because I'm at work and can't get VB installed on my desktop. This program is supposed to display the amount of gross pay for employees based on their weekly sales (if $5000 or more times 9% + $200) while using a one dimensional array.
View 2 Replies
Feb 4, 2011
I'm having trouble finishing up this salary program which is designed to calculate salary based on gross sales while using arrays. Essentially, when the Calculate Salary click event is initiated after salary is entered, either $200 should show up in the list box or, if the persons sales were over $5,000, a calculation of their sales * 9% + 200 should show up in the list box. Right now, anytime I enter any number, "Double Array()" shows up in that list box.
Option Strict On
Public Class Form1
Dim salary(19) As Double
[code].....
View 10 Replies
Mar 29, 2011
We need to calculate salary based on monthly gross. Here we are having problem with ESI salary header Consider monthly gross is 12000 and headers are
BASIC = (Monthly Gross) * 40%
HRA = (BASIC) * 40%
Conv. = 800
PF = Basic * 12%
[code]....
In Excel using Goal Seek, we can get the solution for this.Is there any way to get in VB.NET?
View 1 Replies
Aug 15, 2011
i want to calculate total salary according to attending days.
View 5 Replies
Jun 8, 2011
I want to know about grading system in visual studio I am new in software engr just tell me how we make grading system in windows application in visual studio like when we put 5 in grade section the basic salary will be 15000 and home allowance will be 15 percent of basic salary and conveyance allowance should be 10 percent of basic salary then integer in gross salary will be shown and it will be basic salary plus home allowance plus conveyance allowance minus 5 percent of tax on basic salary and net amount will be shown
View 2 Replies
Sep 25, 2010
I don't understand the error, Argument not specified for parameter 'test' of 'Public Shared Function TestThis(test As String)'.
Partial Public Class Form1
Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)
Form1.Invoke(TestThis, New Object(){"test"}) 'error
[code].....
View 6 Replies
Mar 22, 2011
I have to create an app that computes the amount income tax that a person has to pay, depending on salary. Income tax should be calculated for each portion of income in each range. Here are the following income ranges and taxe rates:
Not over $7825=10%income tax
$7825-31852 = 15%income tax
$31851-77100 = 25%income tax
[code].....
i keep getting zeros.
View 4 Replies
May 25, 2009
i am a beginner learning vb.net. I have an excercise to create a form and on clicking the totals buttons it should display the number of employees who have earnt a salary within the ranges below. Now this code works, but i want to substitute the Select Case Statement with a more efficient for..next statment to increment my counter. The code is:
[Code]....
View 2 Replies
Aug 16, 2010
how we can declare a connectionstring in a module and call that module
View 1 Replies
Apr 27, 2012
I have a VB.Net interface that communicates with an Access 2k3 Database using this module:
Module MOD_ENGINE
'Declare Database connections controls
Dim con As New OleDb.OleDbConnection
Dim dbProvider, dbSource As String
[code]....
I want to call EngineConnect procedure from MOD_ENGINE module into popCboBox module so I can ignate the engine!
View 3 Replies
Feb 4, 2011
I'm having trouble finishing up this salary program which is designed to calculate salary based on gross sales while using arrays. Essentially, when the Calculate Salary click event is initiated after salary is entered, either $200 should show up in the list box or, if the persons sales were over $5,000, a calculation of their sales * 9% + 200 should show up in the list box. Right now, anytime I enter any number, "Double Array()" shows up in that list box. Additionally, a bar graph is supposed to supposed to be displayed in the lower list box showing how many people are in certain categories starting from "$200-$299" through "over $999". These results should be shown when the Show Totals click event is initiated.
[code]...
View 1 Replies
May 25, 2009
[code]...
and from VB6 project I reference to Test.dll but an error messege was appear A reference to Test.dll file could not be added (If I create VB NET project and reference to file Test.dll it OK )
View 10 Replies
Sep 20, 2011
Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
View 2 Replies
Oct 22, 2010
In C# we can declare a decimal number as negative zero i.e usingDecimal x = -0.0M we can define a variable x which holds value i.e negative zero. +ve zero can be differentiated from -ve zero using Decimal.GetBits method and looking at its MSB
View 4 Replies
Dec 12, 2011
I use this code to return records in a DataGridView:
[Code]....
View 3 Replies
Oct 7, 2010
I'm working up a system where I plan on using RealProxy objects to enable intercepting method calls against a set of objects, handling the call, and then returning appropriate results. This works just find for simple return types like strings or ints, but I can't seem to return objects from the RealProxy.Invoke method. Everything works. I get no errors, but the returned value is always NOTHING, instead of an object.
I've worked up the smallest sample code I could, and have included it below. Essentially, just call RPtest and single step through. The code creates a simple object, RPTestA, with a string field and an object valued field It then retrieves the string
[Code]...
View 1 Replies
Jul 21, 2011
I have an SQL Query that looks like this [code]I get two results. The first is the correct one which is -0.0060 and the second @return_value which is 0.This is also the case when I call the stored procedure from my code, I get a 0 back instead of the -0.0060 that I want. This is how I am calling the stored procedure from my code:[code]
View 3 Replies
Jul 11, 2010
I'm doing some math with the Timespans in .Net, and occasionally the sum results in a negative Timespan. When I display the result I am having trouble formatting it to include the negative indicator.
Dim ts as New Timespan(-10,0,0)
ts.ToString()
This will display "-10:00:00", which is good but I don't want to show the seconds so tried this.
ts.ToString("hh:mm")
This returns "10:00" and has dropped the "-" from the front which is the crux of the issue. My current solution is this:
If(ts < TimeSpan.Zero, "-", "") & ts.ToString("hh:mm")
but I was hoping to accomplish the same by using only the format string.
View 4 Replies
Jul 23, 2009
My program im working on does grayscale, builds an alpha mask, and splits the color channels.How do you invert a picture? the above are done looking at the image pixel by pixel.
Im using vb2005.net, for the sake of speed is there other ways of doing those things using drawing.graphics?
View 1 Replies
May 11, 2011
Quick Basic alllowed the use of negative array index's (ex. Dim points(-8000 to 8000). I am trying to convert this QB program to VB but it won't allow negative array index's. How can I create a negative index array in my VB code?
View 12 Replies
Feb 2, 2010
i have a negative number and i want to change it to its positive
eg -14 to 14
View 22 Replies
Feb 22, 2012
I am using delta plc. i want to send +1 to +30 & -1 to -30 numbers in 4 byte hex format(xxxx) in vb.net.
View 4 Replies
May 10, 2011
What do I use for the format number function to show a - for negative numbers instead of ()?
View 2 Replies