I have an ms access database with 2 tables in it which I named Customers and Products. I am using visual studio 2010, in my windows form I have 4 textboxes and 3 button in it, for my 1st textbox when I entered one of my ProductCode such as 10111, then press the Display button, the other remaining 3 textboxes should populate and display the following;
I am not able to get my textbox values in my Register class for my calcTotal method. However, if I convert the text to a double in the Form class and then pass that to my function it will work. But I don't understand why I need to do it like that.
I am trying to get 2 numbers from 2 textboxs and get a return sum in the third textbox. the strange thing is that i got it to work with this code that i am going to provide on the last app i worked on, now on the new app i am on it doesnt work at all.. I am not getting any Errors, just shows a zero when i calculate to the sum of the total textbox.
int sum1 = 0; int sum2 = 0; int result = 0; if (int.TryParse(txtPrice.Text, out sum1) & int.TryParse(txtQuantity.Text, out sum2)) result = sum1 * sum2; txtSubTotal.Text = result.ToString();
i create two forms add a password in first form throgh user input and second form will open i want that password will automatically be added to second form. first form is ok working according to my expactations but problem that it does not enter pssword in second form i reference that textbox that is
stdfrm std=new std(); std.a=txtpwd;
it displays an error that cannot implicitly convert type system.windows.forms.textbox to string
I have a text box invoice no on windows form and i need to retrieve data from database and everytime user click on the add button the invoice no should increment by 1...
I have 3 columns already made Product, Price, Quantity, - what I want to do is take the textbox's txtName, txtPrice, txtQuantity, and add them to the columns in the right specific places.
I'm trying to get some more user friendly things in my program done. Now I'm trying to filter by typing in a text box and it filters to what you are typing and shows the entire row.
I am completely new to SQL server i know a few of the basics. I have a VS2010 asp.net c# application with two dropdown listboxes and a textbox. I need to calculate the numbers e.g 3 + 3 = Medium, using the table below to calculate the answer so i can insert the output value into a textbox.
Table 12345 1ColdColdColdColdHOT 2ColdColdColdMediumHOT 3ColdMediumMediumHOTHOT 4MediumMediumMediumHOTHOT 5MediumMediumMediumHOTHOT Drop down Listbox3Drop down Listbox3
The program asks for to ask the user for how many students there are, and how many strawberries they picked. The farm gets to keep half and the students get to keep the rest.
I am using functions and passing values to one function to another. I know I am making it harder then I need to, but I want to work with functions more and passing values. I figured it was better to practice with simple programs.
I am trying to get some confirmation about how to pass to functions. If you want to assign default values to certain parameters, and have others defined inside the body of int main(), then the parameters which will have default values go at the end of the list. Is that correct?
i.e. The following code is wrong, because we cannot leave a black in the function call on the third line of the main function. However, if we switch the prototype to void Passing (int a, int c, int b = 1); and the function definition to void Passing (int a , int c, int b) everything will be okay and we can call the function as Passing (a, c).
In brief, we cannot do this EVER: Passing( a, , c)right? #include <iostream> using namespace std;
So form two needs to pass information that was typed in its text box to form 3. So then form 3 can use this information. I think I am creating a new instance of form 2 because I get the exception can not divide by 0 so it is empty even if I typed in a integer in the text boxes. How to pass information from the textbox to a var that can be used in another form.
public partial class MapProperties : Form { private int _numRows; public int NumRows { get { return _numRows; }
passing selected row in gridview to my dropdown. I have 1 gridview, 1 textbox and 1 dropdown list box. My dropdown is populated by SqlDataSource from my table Country. On my gridview, I have 3 columns, which are SELECT, NAME and COUNTRY. Under SELECT column, I have my hyperlinked Select, every time I clicked on a certain row NAME will pass in textbox (no problem with that), but in my dropdown it does not populates the COUNTRY that I choose. For example, I have Jack for name and USA for country. Beside Jack and USA, I have a hyperlink Select, when I click Select, Jack will display on my textbox and supposed to be USA will display on my dropdown but not displaying instead it says an error "'cboCountry' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value".
I'm working through the Let us C book. One exercise asks me to collect int and float , then pass them to a function that gets product of these and returns it to main. My code looks like this:
Code:
#include <stdio.h>#include <stdlib.h> main() { int a; float b, c;
[Code]...
So while compiling i get an error about conflicting types for product. I tried to google that error but couldn't understand what's the problem. My only clue is that i can't pass int and float to a function at the same time... Could that be it?
I am currently writing a program which needs an edit form. This form is to edit a country in the datagridview which I have. I am however confused about how to pass the data from the data gridview in the main form to the relative places on the edit form. I have done most of the coding as shown below. I know I need a method in my AVL class to return all the information of the selected country back to the main form method which then passes it back to the edit form and displays it. I am unsure what to pass and what to write in this method.
Main form method
public void button2_Click(object sender, EventArgs e) { // creates new form referencing data grid view and AVL Tree EditCountryForm editform = new EditCountryForm(ref this.countryTree, dataGridView1); string CountryName = ""; //set name of country selected to string
using namespace std; const int AS = 6; void FillingRandomly(int (*)[AS]); void printing(int (*)[AS]);
[Code] ....
Basically I have to create an array, fill it, and then print it on screen. The tricky thing is that need to use pointers to fill it and print and later on sort it. My problem is that with this code is that i get
Error2error C2109: subscript requires array or pointer typec:userspcdesktopusbanthonydocumentsvisual studio 2012projectsessaieessaieessaie.cpp55 and 5IntelliSense: expression must have pointer-to-object typec:UserspcDesktopUSBAnthonyDocumentsVisual Studio 2012ProjectsEssaieEssaieEssaie.cpp55
This read a file (arrival time , brust time) for n processes and suppose to do shortest job first scheduling. the file read correctly but passing the value to SJF function gives read of 0's to all values .
#include<stdio.h> #include<stdlib.h> typedef struct { int brust_time[10]; int arrival_time[10]; }Time;