EDN Admin
Well-known member
1. Entered Data Successfully by pressing Save Button,
2. but I want to save & ask print dialog & print that form as it is.
please tell me, how to create report & print form data to the printer
<pre class="prettyprint namespace SchoolGalaxy
{
public partial class FeesReceipt : Form
{
public FeesReceipt()
{
InitializeComponent();
}
private void btnSave_Click(object sender, EventArgs e)
{
string str = @"Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\SchoolGalaxy\GalaxyData.mdb";
OleDbConnection myconnection = new OleDbConnection(str);
OleDbCommand mycommand = new OleDbCommand();
mycommand.CommandText = "INSERT into StudFeesRecord values(" + lblReceiptNo.Text + ","
+ ReceiptDate.Text + ","
+ txtFullName.Text + ","
+ txtAllFeesReg.Text + ","
+ txtAllFeesAcademic.Text + ","
+ txtAllFessTution.Text + ","
+ txtAllFeesLibrary.Text + ","
+ txtAllFeesComputer.Text + ","
+ txtAllFeesExam.Text + ","
+ txtAllFeesLab.Text + ","
+ txtAllFeesGames.Text + ","
+ txtAllFeesBusFare.Text + ","
+ txtAllFeesGathering.Text + ","
+ txtAllFeesCycleStand.Text + ","
+ txtAllFeesOther.Text + ")";
MessageBox.Show(mycommand.CommandText.ToString());
myconnection.Open();
mycommand.Connection = myconnection;
mycommand.ExecuteNonQuery();
MessageBox.Show("Record Inserted");
myconnection.Close();
txtFullName.Text = "";
txtAllFeesReg.Text = "0.00";
txtAllFeesAcademic.Text = "0.00";
txtAllFessTution.Text = "0.00";
txtAllFeesLibrary.Text = "0.00";
txtAllFeesComputer.Text = "0.00";
txtAllFeesExam.Text = "0.00";
txtAllFeesLab.Text = "0.00";
txtAllFeesGames.Text = "0.00";
txtAllFeesBusFare.Text = "0.00";
txtAllFeesGathering.Text = "0.00";
txtAllFeesCycleStand.Text = "0.00";
txtAllFeesOther.Text = "0.00";
PrepareReceiptNo();
Application.OpenForms["FeesReceipt"].Close();
Form PYN = new SchoolGalaxy.PrintYesNo();
PYN.Show();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void FeesReceipt_Load(object sender, EventArgs e)
{
PrepareReceiptNo();
// TODO: This line of code loads data into the myDS1.studinfo table. You can move, or remove it, as needed.
//this.studinfoTableAdapter.Fill(this.myDS1.studinfo);
string strDatabase = "Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\schoolgalaxy\galaxydata.mdb";
string strTable = "SELECT distinct[StudentName] FROM [StudInfo]" + "ORDER BY [StudentName] asc";
OleDbConnection myConnection = new OleDbConnection(strDatabase);
OleDbCommand myCommand = new OleDbCommand();
myCommand.Connection = myConnection;
myCommand.CommandType = CommandType.Text;
myCommand.CommandText = strTable;
{
myConnection.Open();
OleDbDataReader myReader = myCommand.ExecuteReader();
AutoCompleteStringCollection source = new AutoCompleteStringCollection();
DataTable myTable = new DataTable();
//source.AddRange(new string[]
// {
// "Rahul",
// "aruna",
//"shilpa",
//"amol",
//"Pragati",
// "pankaj",
// "pradeep",
//"Rani",
//});
if (myReader.HasRows == true)
{
while (myReader.Read())
source.Add(myReader["StudentName"].ToString());
}
else
{
MessageBox.Show("Data not found");
}
myReader.Close();
// Create and initialize the text box.
this.txtFullName.AutoCompleteMode = AutoCompleteMode.Suggest;
this.txtFullName.AutoCompleteSource = AutoCompleteSource.CustomSource;
this.txtFullName.AutoCompleteCustomSource = source;
myConnection.Close();
}
}
private void PrepareReceiptNo()
{
// TODO: This line of code loads data into the myDS1.studinfo table. You can move, or remove it, as needed.
//this.studinfoTableAdapter.Fill(this.myDS1.studinfo);
string strDatabase = "Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\schoolgalaxy\galaxydata.mdb";
string strTable = "SELECT * FROM StudFeesRecord";
OleDbConnection myConnection = new OleDbConnection(strDatabase);
OleDbCommand myCommand = new OleDbCommand();
{
myConnection.Open();
DataSet myDS = new DataSet();
OleDbDataAdapter myDA = new OleDbDataAdapter(myCommand);
myCommand.CommandType = CommandType.Text;
myCommand.Connection = myConnection;
myCommand.CommandText = strTable;
OleDbDataReader myReader = myCommand.ExecuteReader();
DataTable myTable = new DataTable();
myTable.Load(myReader);
int _recordcount = myTable.Rows.Count;
//label6.Text = ("" + _recordcount);
_recordcount++;
lblReceiptNo.Text = ("" + _recordcount);
myConnection.Close();
}
}
private void txtAllFeesReg_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesAcademic_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFessTution_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesLibrary_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesComputer_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesExam_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesLab_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesGames_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesBusFare_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesGathering_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesCycleStand_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesOther_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
}
}[/code]
<br/>
<img alt="" height="555" src="http://social.msdn.microsoft.com/Forums/getfile/125324" width="768
View the full article
2. but I want to save & ask print dialog & print that form as it is.
please tell me, how to create report & print form data to the printer
<pre class="prettyprint namespace SchoolGalaxy
{
public partial class FeesReceipt : Form
{
public FeesReceipt()
{
InitializeComponent();
}
private void btnSave_Click(object sender, EventArgs e)
{
string str = @"Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\SchoolGalaxy\GalaxyData.mdb";
OleDbConnection myconnection = new OleDbConnection(str);
OleDbCommand mycommand = new OleDbCommand();
mycommand.CommandText = "INSERT into StudFeesRecord values(" + lblReceiptNo.Text + ","
+ ReceiptDate.Text + ","
+ txtFullName.Text + ","
+ txtAllFeesReg.Text + ","
+ txtAllFeesAcademic.Text + ","
+ txtAllFessTution.Text + ","
+ txtAllFeesLibrary.Text + ","
+ txtAllFeesComputer.Text + ","
+ txtAllFeesExam.Text + ","
+ txtAllFeesLab.Text + ","
+ txtAllFeesGames.Text + ","
+ txtAllFeesBusFare.Text + ","
+ txtAllFeesGathering.Text + ","
+ txtAllFeesCycleStand.Text + ","
+ txtAllFeesOther.Text + ")";
MessageBox.Show(mycommand.CommandText.ToString());
myconnection.Open();
mycommand.Connection = myconnection;
mycommand.ExecuteNonQuery();
MessageBox.Show("Record Inserted");
myconnection.Close();
txtFullName.Text = "";
txtAllFeesReg.Text = "0.00";
txtAllFeesAcademic.Text = "0.00";
txtAllFessTution.Text = "0.00";
txtAllFeesLibrary.Text = "0.00";
txtAllFeesComputer.Text = "0.00";
txtAllFeesExam.Text = "0.00";
txtAllFeesLab.Text = "0.00";
txtAllFeesGames.Text = "0.00";
txtAllFeesBusFare.Text = "0.00";
txtAllFeesGathering.Text = "0.00";
txtAllFeesCycleStand.Text = "0.00";
txtAllFeesOther.Text = "0.00";
PrepareReceiptNo();
Application.OpenForms["FeesReceipt"].Close();
Form PYN = new SchoolGalaxy.PrintYesNo();
PYN.Show();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void FeesReceipt_Load(object sender, EventArgs e)
{
PrepareReceiptNo();
// TODO: This line of code loads data into the myDS1.studinfo table. You can move, or remove it, as needed.
//this.studinfoTableAdapter.Fill(this.myDS1.studinfo);
string strDatabase = "Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\schoolgalaxy\galaxydata.mdb";
string strTable = "SELECT distinct[StudentName] FROM [StudInfo]" + "ORDER BY [StudentName] asc";
OleDbConnection myConnection = new OleDbConnection(strDatabase);
OleDbCommand myCommand = new OleDbCommand();
myCommand.Connection = myConnection;
myCommand.CommandType = CommandType.Text;
myCommand.CommandText = strTable;
{
myConnection.Open();
OleDbDataReader myReader = myCommand.ExecuteReader();
AutoCompleteStringCollection source = new AutoCompleteStringCollection();
DataTable myTable = new DataTable();
//source.AddRange(new string[]
// {
// "Rahul",
// "aruna",
//"shilpa",
//"amol",
//"Pragati",
// "pankaj",
// "pradeep",
//"Rani",
//});
if (myReader.HasRows == true)
{
while (myReader.Read())
source.Add(myReader["StudentName"].ToString());
}
else
{
MessageBox.Show("Data not found");
}
myReader.Close();
// Create and initialize the text box.
this.txtFullName.AutoCompleteMode = AutoCompleteMode.Suggest;
this.txtFullName.AutoCompleteSource = AutoCompleteSource.CustomSource;
this.txtFullName.AutoCompleteCustomSource = source;
myConnection.Close();
}
}
private void PrepareReceiptNo()
{
// TODO: This line of code loads data into the myDS1.studinfo table. You can move, or remove it, as needed.
//this.studinfoTableAdapter.Fill(this.myDS1.studinfo);
string strDatabase = "Provider = Microsoft.Jet.OleDb.4.0; Data Source = G:\Galaxy\schoolgalaxy\galaxydata.mdb";
string strTable = "SELECT * FROM StudFeesRecord";
OleDbConnection myConnection = new OleDbConnection(strDatabase);
OleDbCommand myCommand = new OleDbCommand();
{
myConnection.Open();
DataSet myDS = new DataSet();
OleDbDataAdapter myDA = new OleDbDataAdapter(myCommand);
myCommand.CommandType = CommandType.Text;
myCommand.Connection = myConnection;
myCommand.CommandText = strTable;
OleDbDataReader myReader = myCommand.ExecuteReader();
DataTable myTable = new DataTable();
myTable.Load(myReader);
int _recordcount = myTable.Rows.Count;
//label6.Text = ("" + _recordcount);
_recordcount++;
lblReceiptNo.Text = ("" + _recordcount);
myConnection.Close();
}
}
private void txtAllFeesReg_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesAcademic_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFessTution_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesLibrary_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesComputer_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesExam_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesLab_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesGames_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesBusFare_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesGathering_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesCycleStand_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
private void txtAllFeesOther_TextChanged(object sender, EventArgs e)
{
double allfeestotal = 0;
allfeestotal = double.Parse(this.txtAllFeesAcademic.Text) + double.Parse(this.txtAllFeesBusFare.Text) + double.Parse(this.txtAllFeesComputer.Text) + double.Parse(this.txtAllFeesCycleStand.Text) + double.Parse(this.txtAllFeesExam.Text) + double.Parse(this.txtAllFeesGames.Text) + double.Parse(this.txtAllFeesGathering.Text) + double.Parse(this.txtAllFeesLab.Text) + double.Parse(this.txtAllFeesLibrary.Text) + double.Parse(this.txtAllFeesOther.Text) + double.Parse(this.txtAllFeesReg.Text) + double.Parse(this.txtAllFessTution.Text);
txtAllFeesTotal.Text = allfeestotal.ToString("F");
}
}
}[/code]
<br/>
<img alt="" height="555" src="http://social.msdn.microsoft.com/Forums/getfile/125324" width="768
View the full article