ChrisHunter 152 Posting Whiz in Training Featured Poster

pretty hardcore going all the way down to binary, it would take up a lot less space but would binary be as re-usable and readable by other users as xml ?

ChrisHunter 152 Posting Whiz in Training Featured Poster

I would recommend delimiting the data in some fashion or otherwise structuring your file so that there is a "table of contents" so to speak.

Zachattach05 has a good point look into using Xml to store data, you can structure your data using tags/ nodes and child tags/ nodes to add more structure to your data.

It's a good idea aswell because you can use this data across different DBMS'

ChrisHunter 152 Posting Whiz in Training Featured Poster

is it just a new form within the same application that you want to open or is it a form within a seperate application ?

if it's just a form within the same app try just doing

//creates an instance of the form you want to open 
MyForm form1 = new MyForm();

// put this in the method which you want to open the new form
form1.Show();
ChrisHunter 152 Posting Whiz in Training Featured Poster

If i'm honest other than just trying to establish a connection without the use of an ethanet cable i don't know how to check if it's wireless, i've only recently graduated as a software engineer so networking isn't my area but you can pick one up for around 15GBP

ChrisHunter 152 Posting Whiz in Training Featured Poster

If it's a wireless one it should do

ChrisHunter 152 Posting Whiz in Training Featured Poster

I'm guessing just make sure your router is a wireless router and make sure you have a wireless network card and then connect to the router wirelessly.

I'm not really a networking person

ChrisHunter 152 Posting Whiz in Training Featured Poster

have any images of the ps4 been released yet ?

ChrisHunter 152 Posting Whiz in Training Featured Poster

cwarn23 that was amazing your a legend in my books just for that one post !

ChrisHunter 152 Posting Whiz in Training Featured Poster

The way people are going on about you'd think Steve Jobs was their mother and tables and mp3 players had never existed before the iPod and iPad. i'm not a fan of Apple only the iPod (nano because it's lasted 5 years and i got it cheap) but the company is bigger than one man and similar technology to that released by Apple would more than likely have been released eventualy through natural progression.

How ever Apply (and Steve Jobs) have played a massive part in the advancement of technology. it's not nice to here that anyone has died and should be good to see what Apple go on to do in the future.

Just remember when we're all flying around on hoverboards the idea came from Back to the future in the 80's !

ChrisHunter 152 Posting Whiz in Training Featured Poster
ChrisHunter 152 Posting Whiz in Training Featured Poster

Take a look as this and this they might be of some help

ChrisHunter 152 Posting Whiz in Training Featured Poster

have you tried my solution ? i might be a bit longer but will still do the job. However do this in the line that says label.TEXT = . . .

lable1.Text = lable1.Text + "ID = " + id "\r\n";
ChrisHunter 152 Posting Whiz in Training Featured Poster

sorry i forgot to put

string sql = "SELECT COUNT(Custoberid) FROM mydatabase.studentinfo";
ChrisHunter 152 Posting Whiz in Training Featured Poster

To get the login form to show first go to Program.cs in your solution and change the Application.Run(new youformname); to be Application.Run(new Loginfor);

to show the menu, in the method that checks the login details do

MainForm mainFrm = new MainFor(); 
this.Hide();
mainFrm.Show();
ChrisHunter 152 Posting Whiz in Training Featured Poster

you need something like this (i might have made a few mistakes as im still new ish to c#, i did something similar in my uni project)

public void setLable()
{
	List<string> customerids = new List<string>();

	customerids = getCustonerID();
	
	foreach (string id in customerids)
	{
	    Lable1.TEXT = "ID = " + id "\n";
	}
}


public List<string> getCustiomerID()

	    string sql = "SELECT Custoberid FROM mydatabase.studentinfo";


            SqlCommand cmd2 = new SqlCommand(sql, db.Connect());

            List<string> CustomeridList = new List<string>();

            try
            {
                // Creates SQLdatareader
                SqlDataReader reader2;

                // Reads the result of cmd command
                reader2 = cmd2.ExecuteReader();

                // Loops while there is data to available to read
                while (reader2.Read())
                {
                    // Adds each ID read to a list of strings
                    CustomeridList.Add(reader2["Customerid "].ToString());
                }
                //Closes reader
                reader2.Close();
            }
            //Executed if try cannot execute
            catch (Exception ex)
            {
		throw Exception("" + ex);
            }

            //Returns string list
            return objectIDlist;
ChrisHunter 152 Posting Whiz in Training Featured Poster

I made desktop app in VS 2010 for my final project in Uni an i made an app.config file with my connection string in which was like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="ConnectionString"
            connectionString="Data Source=MyPC\MyDB;Initial Catalog=MyDB;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>

Next i created a class called DBConnect with a method which when called, establishes connection to the DB:

class DBConnection
    {
        #region Database connection method
        public SqlConnection Connect()
        {
            SqlConnection conn = new SqlConnection();
            conn.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
            
            try
            {
                conn.Open();
            }
            catch
            {
            }
            return conn;
        }
        #endregion
    }

and when i want to carry out an querry on the DB i created an instance of the DBConnection class and did something like this which counts the number of rows in tbl1 that mach the WEHRE clause:

public bool checkForUser(string name)
        {
            //booliean variable called noUsers set with a value of false
            bool Users = false;

            //SQL string to count the amount of rows within the OSDE_Users table
            string sql = "SELECT COUNT(LogonName) FROM MyDB.tbl1 WHERE LogonName = '" + name + "'";

            SqlCommand cmd = new SqlCommand(sql, db.Connect());

            try
            {
                //Sets the value of int variable called rowCount with the result of the executed Sql statement called sql
                int rowCount = Convert.ToInt32(cmd.ExecuteScalar());

                //Executed if value of rowCount is greater than or equal to 1
                if (rowCount >= 1)
                {
                    ////Sets the value of noUsers to false
                    Users = true;
                }
                //Executed if value of rowCount is less than or equal …
ChrisHunter 152 Posting Whiz in Training Featured Poster

I don't know if this helps but it closes the current form containing the button that you click and opens the report when the button is clicked.

// declare this after the class constructor
Report newMDIChild = new Report(); 
  
private void button1_Click(object sender, EventArgs e)
{         
// Hides the current form        
this.Hide();            
// Display the new form.            
newMDIChild.Show();
}
ChrisHunter 152 Posting Whiz in Training Featured Poster

Would the formula not be

result = (value1 / 100) * value2;

value2 is the persentage you want