MIT Guru-lk

MIT Guru-lk
All Stories

Thursday, May 24, 2012

Microsoft® SQL Server® 2008 R2 Express is a powerful and reliable data management system that delivers a rich set of features, data protection, and performance for embedded applications, lightweight Web Sites and applications, and local data stores.

Download  SQL Server® 2008 R2 Express

Download SQL Server® 2008 R2 Express

Microsoft® SQL Server® 2008 R2 Express is a powerful and reliable data management system that delivers a rich set of features, data protection, and performance for embedded applications, lightweight Web Sites and applications, and local data stores.

Download  SQL Server® 2008 R2 Express

Posted at 2:50 AM |  by Mit Guru

0 comments:


This program is show how to use check box in c#.net. According to this program if you tick the course (Check Box) and click the Tell Me Button it show check courses in bellow Label.

C#.net Code for Checkbox

Download Project



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;



namespace checkedbox
{
    public partial class Form1 : Form
    {
      public Form1()
    {
    InitializeComponent();
    }
    private void tellmeButton_Click(object sender, EventArgs e)
    {

    string result = "";

    if (radcheckBox.Checked)
    {
      result += "\nRapid Application";
    }
    if (dbmscheckBox.Checked)
    {
     result += "\nData Base Management";
    }
    if (technocheckBox.Checked)
    {
     result += "\nTechnology Management";
    }
    if (pccheckBox.Checked)
    {
     result += "\nPC Application";

    }

    resultLabel.Text = "Your Cause is:." + result;

    }

    }

}


Checked box in C#


This program is show how to use check box in c#.net. According to this program if you tick the course (Check Box) and click the Tell Me Button it show check courses in bellow Label.

C#.net Code for Checkbox

Download Project



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;



namespace checkedbox
{
    public partial class Form1 : Form
    {
      public Form1()
    {
    InitializeComponent();
    }
    private void tellmeButton_Click(object sender, EventArgs e)
    {

    string result = "";

    if (radcheckBox.Checked)
    {
      result += "\nRapid Application";
    }
    if (dbmscheckBox.Checked)
    {
     result += "\nData Base Management";
    }
    if (technocheckBox.Checked)
    {
     result += "\nTechnology Management";
    }
    if (pccheckBox.Checked)
    {
     result += "\nPC Application";

    }

    resultLabel.Text = "Your Cause is:." + result;

    }

    }

}


Posted at 2:11 AM |  by Mit Guru

0 comments:

mitguru-lk

This program show how to calculate Car Rental using type of car, Km and Number of rental days. Insert that details and click Process Button then calculate total rental and Click Clear Button Clear all details for new One. When you click Exit button exit this program.

C#.net Code for Simple Car Rental Program


Download Source Project


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CarRental
{
 public partial class Form1 : Form

 {
 public Form1()
 {
 InitializeComponent();
 }
 private void processButton_Click(object sender, EventArgs e)

 {
  decimal day, total,km;

  day = decimal.Parse(daytextBox.Text);

  km = decimal.Parse(kmtextBox.Text);

  total = 0;

  if (HondarButton.Checked)

  {
   total = (1500 + (20 * km)) - (80 * day);
  }
  else if (nissanrButton.Checked)
  {
  total = (2000 + (30 * km)) - (60 * day);
  }
  else if(civicrButton.Checked)
  {
  total = (2500 + (40 * km)) - (50 * day);
  }
  else
  {
  MessageBox.Show("Invalid Info");
  }
  totaltextBox.Text = total.ToString("c");
  }
 }

 private void clear()
 {
  daytextBox.Clear();

  kmtextBox.Clear();

  totaltextBox.Clear();

  HondarButton.Checked = true;

  daytextBox.Focus();
 }

 private void exitButton_Click(object sender, EventArgs e)
 {
  this.Close();
 }

 private void clearButton_Click(object sender, EventArgs e)
 {
  clear();
 }

 }

}

Simple Car Rental program in C#

mitguru-lk

This program show how to calculate Car Rental using type of car, Km and Number of rental days. Insert that details and click Process Button then calculate total rental and Click Clear Button Clear all details for new One. When you click Exit button exit this program.

C#.net Code for Simple Car Rental Program


Download Source Project


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CarRental
{
 public partial class Form1 : Form

 {
 public Form1()
 {
 InitializeComponent();
 }
 private void processButton_Click(object sender, EventArgs e)

 {
  decimal day, total,km;

  day = decimal.Parse(daytextBox.Text);

  km = decimal.Parse(kmtextBox.Text);

  total = 0;

  if (HondarButton.Checked)

  {
   total = (1500 + (20 * km)) - (80 * day);
  }
  else if (nissanrButton.Checked)
  {
  total = (2000 + (30 * km)) - (60 * day);
  }
  else if(civicrButton.Checked)
  {
  total = (2500 + (40 * km)) - (50 * day);
  }
  else
  {
  MessageBox.Show("Invalid Info");
  }
  totaltextBox.Text = total.ToString("c");
  }
 }

 private void clear()
 {
  daytextBox.Clear();

  kmtextBox.Clear();

  totaltextBox.Clear();

  HondarButton.Checked = true;

  daytextBox.Focus();
 }

 private void exitButton_Click(object sender, EventArgs e)
 {
  this.Close();
 }

 private void clearButton_Click(object sender, EventArgs e)
 {
  clear();
 }

 }

}

Posted at 2:08 AM |  by Mit Guru

6 comments:


This program is show int array in C#.net. you can use four methods for this each method is show in the button click event.

C#.net Code For Int Array

Download project



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Array_2

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }



        private void arrwithnewkeywordbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();

            int[] MIT31043;

            MIT31043 = new int[60];



            for (int counter = 0; counter <MIT31043.Length; counter++)

            {

                MIT31043[counter] =counter+ 1;

                listBox1.Items.Add(MIT31043[counter].ToString());



            }

        }



        private void arrinitializerbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();

            int[] number = {11,22,33,44,55 };



            for (int counter = 0; counter < number.Length; counter++)

            {

                listBox1.Items.Add(number[counter]);

            }

        }



        private void calculationwitharrbutton_Click(object sender, EventArgs e)

        {



            listBox1.Items.Clear();

            int counter;



            int[] mit = new int[5];



            for (counter = 0; counter < mit.Length; counter++)

            {

                mit[counter] = counter * 3;

                listBox1.Items.Add(mit[counter]);

            }



        }



        private void usingforeachbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();



            int sum = 0;

            int[] mit = {12,23,34,45,56,67 };



            foreach (int counter in mit)

            {

                sum += counter;

                listBox1.Items.Add(counter);

            }

            listBox1.Items.Add("===============");

            listBox1.Items.Add(sum);

        }

    }

}

Array 2 in C# 2010


This program is show int array in C#.net. you can use four methods for this each method is show in the button click event.

C#.net Code For Int Array

Download project



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Array_2

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }



        private void arrwithnewkeywordbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();

            int[] MIT31043;

            MIT31043 = new int[60];



            for (int counter = 0; counter <MIT31043.Length; counter++)

            {

                MIT31043[counter] =counter+ 1;

                listBox1.Items.Add(MIT31043[counter].ToString());



            }

        }



        private void arrinitializerbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();

            int[] number = {11,22,33,44,55 };



            for (int counter = 0; counter < number.Length; counter++)

            {

                listBox1.Items.Add(number[counter]);

            }

        }



        private void calculationwitharrbutton_Click(object sender, EventArgs e)

        {



            listBox1.Items.Clear();

            int counter;



            int[] mit = new int[5];



            for (counter = 0; counter < mit.Length; counter++)

            {

                mit[counter] = counter * 3;

                listBox1.Items.Add(mit[counter]);

            }



        }



        private void usingforeachbutton_Click(object sender, EventArgs e)

        {

            listBox1.Items.Clear();



            int sum = 0;

            int[] mit = {12,23,34,45,56,67 };



            foreach (int counter in mit)

            {

                sum += counter;

                listBox1.Items.Add(counter);

            }

            listBox1.Items.Add("===============");

            listBox1.Items.Add(sum);

        }

    }

}

Posted at 2:04 AM |  by Mit Guru

0 comments:


This program is show int array and String array in two methods. Following is the code snippet for this and you can download the source project in click the download icon.

C#.net Code for Array

Download Project



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Array_1

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}



private void inta1button_Click(object sender, EventArgs e)

{

listBox1.Items.Clear();

int[] numbers= new int[5];

numbers[0] = 50;

numbers[1] = 25;

numbers[2] = 40;

numbers[3] = 15;

numbers[4] = 10;



for (int i = 0; i < numbers.Length; i++)             {                 listBox1.Items.Add(numbers[i]);                 listBox1.Items.Add("");             }          }          private void inta2button_Click(object sender, EventArgs e)         {             listBox1.Items.Clear();             int[] numbers = {55,25,45,15,10 };              for (int i = 0; i < numbers.Length; i++)             {                 listBox1.Items.Add("Number ["+i+"]"+"==>"+numbers[i]);

listBox1.Items.Add("");

}

}



private void stringa1button_Click(object sender, EventArgs e)

{

listBox2.Items.Clear();

string[] names = new string[5];

names[0] = "Nadeera";

names[1] = "Chathuranga";

names[2] = "Bandaranayake";

names[3] = "ncb";

names[4] = "cvbn";



foreach (string item in names) 

{

listBox2.Items.Add(item);

listBox2.Items.Add ("");

}

}



private void stringa2button_Click(object sender, EventArgs e)

{

listBox2.Items.Clear();

string[] names = {"Dell","laptop","are","best","one" };



foreach (string item in names)

{

listBox2.Items.Add(item);

listBox2.Items.Add("");

}

}

}

}



Array in C# 2010


This program is show int array and String array in two methods. Following is the code snippet for this and you can download the source project in click the download icon.

C#.net Code for Array

Download Project



using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Array_1

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}



private void inta1button_Click(object sender, EventArgs e)

{

listBox1.Items.Clear();

int[] numbers= new int[5];

numbers[0] = 50;

numbers[1] = 25;

numbers[2] = 40;

numbers[3] = 15;

numbers[4] = 10;



for (int i = 0; i < numbers.Length; i++)             {                 listBox1.Items.Add(numbers[i]);                 listBox1.Items.Add("");             }          }          private void inta2button_Click(object sender, EventArgs e)         {             listBox1.Items.Clear();             int[] numbers = {55,25,45,15,10 };              for (int i = 0; i < numbers.Length; i++)             {                 listBox1.Items.Add("Number ["+i+"]"+"==>"+numbers[i]);

listBox1.Items.Add("");

}

}



private void stringa1button_Click(object sender, EventArgs e)

{

listBox2.Items.Clear();

string[] names = new string[5];

names[0] = "Nadeera";

names[1] = "Chathuranga";

names[2] = "Bandaranayake";

names[3] = "ncb";

names[4] = "cvbn";



foreach (string item in names) 

{

listBox2.Items.Add(item);

listBox2.Items.Add ("");

}

}



private void stringa2button_Click(object sender, EventArgs e)

{

listBox2.Items.Clear();

string[] names = {"Dell","laptop","are","best","one" };



foreach (string item in names)

{

listBox2.Items.Add(item);

listBox2.Items.Add("");

}

}

}

}



Posted at 1:54 AM |  by Mit Guru

1 comments:


This Program Calculate Your age According to your birth day. There are various methods for this but I think this is the easiest way for this.

C#.net code for Age Calculator


Download Sample Code




using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Age_calculater

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}



private void processbutton_Click(object sender, EventArgs e)

{

DateTime dateOfbirth;

DateTime today;

string name = "";

int year, month, day;



name = nameTextBox.Text;

year=int.Parse(yearTextBox.Text);

month = int.Parse(monthTextBox.Text);

day = int.Parse(dayTextBox.Text);



dateOfbirth = new DateTime(year, month, day);



today = DateTime.Today;

TimeSpan differance = today.Subtract(dateOfbirth);

DateTime age = DateTime.MinValue + differance;//min 01/01/01



year = age.Year-1;

month = age.Month - 1;

day = age.Day - 1;



string result = "Dear, " + name + "\nYour Age is " + "\n" + year + " years\n" + month + " Months\n" + day + " Days";



resultlable.Text = result;

}

}

}

Age Calculater With C# 2010


This Program Calculate Your age According to your birth day. There are various methods for this but I think this is the easiest way for this.

C#.net code for Age Calculator


Download Sample Code




using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;



namespace Age_calculater

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}



private void processbutton_Click(object sender, EventArgs e)

{

DateTime dateOfbirth;

DateTime today;

string name = "";

int year, month, day;



name = nameTextBox.Text;

year=int.Parse(yearTextBox.Text);

month = int.Parse(monthTextBox.Text);

day = int.Parse(dayTextBox.Text);



dateOfbirth = new DateTime(year, month, day);



today = DateTime.Today;

TimeSpan differance = today.Subtract(dateOfbirth);

DateTime age = DateTime.MinValue + differance;//min 01/01/01



year = age.Year-1;

month = age.Month - 1;

day = age.Day - 1;



string result = "Dear, " + name + "\nYour Age is " + "\n" + year + " years\n" + month + " Months\n" + day + " Days";



resultlable.Text = result;

}

}

}

Posted at 1:48 AM |  by Mit Guru

1 comments:


MitGuru-lk provide all sample programs code of C# 2010 (Rapid Application Development). Those all programs are Developed in Visual Studio 2010. First You Installed Visual Studio 2010 Ultimate and then try this Samples. if you want to More information about C Sharp go to Useful web site Menu.

C # 2010


MitGuru-lk provide all sample programs code of C# 2010 (Rapid Application Development). Those all programs are Developed in Visual Studio 2010. First You Installed Visual Studio 2010 Ultimate and then try this Samples. if you want to More information about C Sharp go to Useful web site Menu.

Posted at 1:45 AM |  by Mit Guru

0 comments:

Sunday, May 13, 2012


This is sample Database for Rapid Application Development database part and Database Management System (SQL Server 2008)

SQL Server 2008 Northwind Sample Databases Download


This is sample Database for Rapid Application Development database part and Database Management System (SQL Server 2008)

Posted at 11:42 PM |  by Mit Guru

1 comments:

© 2013 MIT Tutorials. WP Theme-junkie converted by BloggerTheme9
back to top