Your method takes 8 parameters, and you are trying to call it with just two params. Either give it all 8 or override the UpdatePatientDetails() to take 2 parameters
tostrinj 0 Newbie Poster
Another thing would be to switch to IE. I know IE fingers owls, but if you switch your default browser, it will show you the page, providing you have IIS running
tostrinj 0 Newbie Poster
Ok, sounds simple but how about a child form having a read only property that can hold a string.
Once the child form closes, this property should still be available immediately after.
change
this.ChildClass = new TextboxForm();
this.ChildClass.Show();
to
this.ChildClass = new TextboxForm();
this.ChildClass.ShowDialog(this);
tostrinj 0 Newbie Poster
Just a suggestion - I code stuff that puts data into MS Office apps - PowerPoint, Excel and Word. You are better of doing it with VB then C#. We do all processing in C# and then use VB to create the documents at the end. With Word this does the table:
Dim trange As Word.Range = _wordDocument.Paragraphs.Item(ParagraphCount()).Range
_wordDocument.Tables.Add(trange, row, col)
Then you can literaly go cell by cell to edit the values
This inserts and formats paragraph of text
With _wordDocument.Range.Paragraphs.Item(ParagraphCount()).Range
.Text = "This is a simple text to be added as paragraph"
.Font.Size = presOptions.FontSize
.Font.Name = presOptions.FontFamily
.Font.Italic = presOptions.Italic
.Font.Bold = presOptions.Bold
.Font.Underline = presOptions.Underlined
.Font.Color = RGB(r, g, b)
.Paragraphs.Alignment = alignment
End With
in the above, pres options is not something I am willing to discuss in details but basically user's settings regarding formatting.
I am a big fan of C# but with office related stuff, VB is much easier. As far as PDF conversion goes - I did this by implementing someone else's libraries, I think it costed us something like $5000.00 for an unlilmited development licence, but saved me tons of work.
tostrinj 0 Newbie Poster
this might be insteresting - sign me up
tostrinj 0 Newbie Poster
I have just read the whole thing and I am confused as to what do you have to do here. And I am getting sys. reqs from some crazy manages for a living. So you got to count unique vowels? Can we get an example of the text file? Ancient Dragon is right, got to exit if file is not opened properly, I guess you guys did not study exceptions yet, simple return would do.
Keep in mind, your L1, L2 and L3 are not innitialized and are passed into a your mistery function, that is no good.
While not clearly understanding what do you have to do here, here is my suggestion on how to make at least what you wrote workable:
int main(){
string line,L1,L2,L3;
string filename = "vowel.txt";
ifstream inFile;
inFile.open("vowel.txt" , ios::in);
if ( inFile.fail())
{
cout<<"\nThe file is not there or some other terrible thing had happened in the process
soon we will learn about exceptions and this type of deal would be much easier.\n";
//exiting with -1 would at least indicate that something bad had happened
return -1;
}
cout<<"We are cooking with gas now"<<endl;
//i am not sure on reading a line part, have not touched c++ since school
while(getline(inFile,line))
{
cout<<line<<endl;
//like I mentioned above, your L* are not innitialized
vowel(L1, L2, L3);
return 0;
}
tostrinj 0 Newbie Poster
Well, it depends on your exe's. You said that you already wrote bunch of stuff, so you do have executables - are you refferencing some COM objects? The dll has to come with the executables. There is no universal answer here. As far as .Net is concerned - most people that have Windows already have .Net installed. It will be hard to find a machine without it. As far as Vista is concerned, it depends on a given executables, some things would work, others would not.
tostrinj 0 Newbie Poster
Well, a student project but at least there was an effort to solve that.
#include <iostream>
#include <string>
int main()
{
double withdraw, deposit, balance, newBalance, amount;
char ans;
string choice;
balance = 1000;
[B] bool good = false;[/B]
cout << "Welcome to Whatever ATM!" << endl;
do
{
[B] while(!good){[/B]
cout << "\nWhat would you like to do from the following?\n"
<< "\nWithdraw from account\n"
<< "Deposit money into account\n"
<< "Balance inquiry\n"
<< "Quit\n"
<< "\nPlease select now" << endl;
cin >> choice;
ans = choice[0];
[B]switch(ans)
{
case 'w':
good = true;
break;
/*go on with your cases
to cover all your allowed values*/
}
[/B] [B] }[/B]
newBalance = balance;
do
{
if ((ans == 'w') || (ans == 'W'))
{
cout << "\nWhat amount would you like to withdraw?" << endl;
cin >> amount;
while (amount > balance)
{
cout << "Sorry, you have insufficient funds.\n"
<< "Please try again: ";
cin >> amount;
}
if (amount <= balance)
{
balance = balance - amount;
newBalance = balance;
cout << "Thank you, your new balance is: " << newBalance << endl;
}
}
if ((ans == 'd') || (ans == 'D'))
{
cout << "\nWhat amount would you like to deposit?" << endl;
cin >> amount;
balance = balance + amount;
newBalance = balance;
cout << "Thank you, your new balance is: " << newBalance <<endl;
}
if ((ans == 'b') || (ans == 'B'))
cout << "Your balance is: " << balance <<endl; …
tostrinj 0 Newbie Poster
ok, here is an example: data is stored in xml and represents the table, need array list of array lists of xml nodes to do some intelligent sorting
ArrayList _arrMaster = new ArrayList
foreach(XmlNode rNode in XmlTable)
{
if(IsStartOfGroup(rNode)) //if we need to start up a group I need a new array list
{
ArrayList _arrSub = new ArrayList();
_arrSub.Add(rNode);
/*add few more xml nodes and then move to the next group */
_arrMaster.Add(_arrSub);
}
}
this is very simplified, but at the end you get:
ArrayList that holds multiple array lists that holds multiple xml nodes that should be grouped together for some reason.
to work this:
private void ReIndexMaster(ref ArrayList master)
{
int iRowCount = 1;
int iCellCount = 1;
foreach(ArrayList tmp in master)
{
foreach(XmlNode rNode in tmp)
{
rNode.Attributes["index"].Value = iRowCount.ToString();
rNode.Attributes["o_index"].Value = iRowCount.ToString();
iRowCount += 1;
iCellCount = 1;
foreach(XmlNode cNode in rNode)
{
cNode.Attributes["index"].Value = iCellCount.ToString();
iCellCount += 1;
}
}
}
}
So the answer - multi dimensional arrays are good for you and are possible. Remember ArrayList holds object and everything is an object (even collections like arraylsits)so there is no limit. I have simplified this example but using casting you can get to any element within a top or bottom level of your arraylist.
Paul
tostrinj 0 Newbie Poster
Lets just keep in mind 3.0 is still beta, right? Why would you code on beta?
Infraction is right on the money
tostrinj 0 Newbie Poster
ok, in your GetProductsColor() you are populating the combo cmbProductColor - right? I would suggest doing cmbProductColor.Items.Clear(); before adding new stuff or you will append the values without getting rid of old values.
Later in the same function you are capturing selected item, well, the selected item is null because your user did not have a chance to actually seleect anything as of yet. This means that your strSelection is null. and when you call GetFirstImprintColors you are actually passing null to it, but it does not matter since you are not usign that string in the function anywho.
I would suggest following approach:
on load - populate both combo boxes, second combo visible = false;
go to the combo1_SelectedIndexChanged and specify that once the idex is changed, combo 1.visible = false and combo 2.visible is true;
go to the combo2_SelectedIndexChanged and do combo 2.visible = false; combo 1.visible = true.
Above events will ensure that once your user selects anything in the combo box 1, combo box 1 is now invisible and combo box 2 is visible. When user selects anything in combo box 2, combo 2 is invisible and combo 1 is visible
hope this helps
P.S. is this homework or something?
tostrinj 0 Newbie Poster
ok, quick and dirty, to be removed before building release - used to help me in my student years. Last line of code is :
Console.ReadLine();
that will wait until you kill the console.
tostrinj 0 Newbie Poster
if you are doing console, it should work like this:
string _sAppPathName = Process.GetCurrentProcess().MainModule.FileName;
string _sDataFilePath = _sAppPath.Substring(0, _sAppPath.Length - (_sAppPath.Length - _sAppPath.LastIndexOf(@"\"))) + @"\yourfilename.yourextension";
tostrinj 0 Newbie Poster
How about this:
string g = "12 + 3";
string[] MyInts = g.Split('+');
ArrayList RealInts = new ArrayList();
for(int i = 0; i < MyInts.Lenght; i++){
RealInts.Add(Convert.ToInt32(((string)MyInts[i]).Trim());
}
At the end you should get an array list of integers.
RealInts[0] = 12;
RealInts[1] = 3;
If you want individual chars converted into ints then something like this should do it
string g = "12 + 3";
char [] MyInts = g.ToCharArray();
ArrayList RealInts = new ArrayList();
Foreach(char c in MyInts){
if(IsNumeric(c.ToString())){
RealInts.Add(Convert.ToInt32(c));
}
}
After this you should get something like this:
RealInts[0] = 1;
RealInts[1] = 2;
RealInts[2] = 3;