Monday, November 29, 2010

how to complete a project successfully

if you are participating in a project of a
course,assignment,others on c#.net or asp.net
or may be others then you should follow the
steps for finishing the project successfully.

1.first define all the objects for your project.
you must go in this way for successfull
finishing in object oriented way.if you are
implementing a bank management system,the
objects may be savings account,checking,
account.

2.fill & write in your class responsibility
collaborator(CRC) diagram with objects.you
should know about CRC.as a brief,its a dependency
diagram between objects.

3.if you are in a team,make a poster and mark
a task in a paper for each member in the poster.
first place the paper for a member in the
'in progress' column then if he/she finishes
the task then pick it up and mark it in the
'finished' column in the poster.in this way
you can convince your teacher/trainer about
the progress for the project and let him know
who is doing what.

4.use google if u fail to write the codes
appropriately or anything you want to know
for the project.

hope this helps to achieve the project
successfully.

how to be a good web programmer

There are many things to know to be a good web programmer for buliding web sites
or blog sites.if u retain dynamic contents in your website then u must know
php/Asp languages.But the first part to build a website is to create website
templates first.For this u need to design your pages in photoshop or
illustrator and then slice it to convert into html with css files.

here is a link for the above conversion example where i converted the following
psd file into html with css(Div based)--

the following links contain more templates and resources-

http://www.metamorphozis.com/
http://anvisionwebtemplates.com/
http://www.csszengarden.com/
http://www.mezzoblue.com/zengarden/resources/

Thursday, October 14, 2010

free c#,asp.net online books

following is the list of online websites which
contain online books,a lot of study material-

1.flazx.com
This website contains a big collection for books
on all topics related to programming or computers

2.IT Ebook
Similar to flazx.com itebookhome.com also contains
huge collection for books related to programming

3.usabooks.org
cotains books on IT Management, C , JavaScript/AJAX,
Web Designing, Graphic Designing, Networking, Database,
others

4.hagioteam.com
it contain online books on all the topics of programming.
Check yourself

Wednesday, July 21, 2010

ListView control example

I am giving the main codes below.If u need
the project with all coding then contact with me.

This program will add,delete user input to a listview box,
it also shows the currently selected employee name
in listview box.

using System;
using System.Collections.Generic;
using System.Text;

namespace MridulSamadder
{
    public enum DesignationType
    {
        SSE,
        SE,
        TeamLead
    }
   public class Employee
    {
        private string id;

        public string Id
        {
            get { return id; }
            set { id = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string designation;

        public string Designation
        {
            get { return designation; }
            set { designation = value; }
        }
        private DateTime dateOfBirth;

        public DateTime DateOfBirth
        {
            get { return dateOfBirth; }
            set { dateOfBirth = value; }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace MridulSamadder
{
    static class Entry
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new EmployeeInformationUI());
        }
    }
}

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

namespace MridulSamadder
{
    public partial class EmployeeInformationUI : Form
    {
        int globalListViewIndex;
        private List<Employee> employeeList = null;
        ListViewItem listviewItemObj = null;
        public EmployeeInformationUI()
        {
            employeeList = new List<Employee> ();
            InitializeComponent();
            FillComboWithData();          
        }

        private void addButton_Click(object sender, EventArgs e)
        {
            Employee employeeObj = new Employee();
            employeeObj.Name = nameTextBox.Text;
            employeeObj.Id = idTextBox.Text;
            employeeObj.Designation = designationComboBox.SelectedValue.ToString();
            employeeObj.DateOfBirth = Convert.ToDateTime(dateOfBirthDateTimePicker.Text);
            employeeList.Add(employeeObj);
            PopulateListView(employeeObj);
          
        }
        public void PopulateListView(Employee employeeObj)
        {                          
                    listviewItemObj = new ListViewItem(employeeObj.Id);
                    listviewItemObj.SubItems.Add(employeeObj.Name);
                    listviewItemObj.SubItems.Add(employeeObj.Designation);
                    listviewItemObj.SubItems.Add(employeeObj.DateOfBirth.ToString());
                    employeeInformationListView.Items.Add(listviewItemObj);
       
         }
        public void FillComboWithData()
        {
            designationComboBox.DataSource = Enum.GetNames(typeof(DesignationType));
        }

        private void deleteButton_Click(object sender, EventArgs e)
        {
            employeeInformationListView.Items.Remove(employeeInformationListView.Items[globalListViewIndex]);          
        }
     
        private void employeeInformationListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            globalListViewIndex = e.ItemIndex;          
        }     
        private void showButton_Click(object sender, EventArgs e)
        {
            string id = employeeInformationListView.Items[globalListViewIndex].Text;
            string name = employeeInformationListView.Items[globalListViewIndex].SubItems[1].Text;
            MessageBox.Show("Name Of The Employee:" + name);
        }

        private void EmployeeInformationUI_Load(object sender, EventArgs e)
        {

        }
    }
}

Wednesday, May 26, 2010

Download MS Windows Identity Foundation for free

This MS Identity Foundation helping simplified access
of users for developers via externalizing access of
users from the appilcation by decreasing development
effort and claims with built in security logic and
.Net tools(integrated).

user benefit are-
1.single sign on
2.collaboration across or in organizational boundaries
seamlessly.

download link & help-
msdn.microsoft.com/hi-in/evalcenter/dd440951.aspx

Thursday, December 10, 2009

using bulit in codes for class properties,methods,comments

here i am going to identify some techniques which are built in visual studio.
you will find that from internet,books but i am discussing it for good programming
practice.


visual studio contains pre written codes for class properties & methods
so you can use for ease of programming.suppose we need to define properties
for the private members of class.we can do it via visual studio refactor
menu and not by hand written codes as follows --

In the class below no properties defined for the private member--
namespace MridulFruitsBusiness
{
    public class Bucket
    {
        private string ownerName;
      
    }
}

now follow-
right click on the ownerName.then click- refactor->Encapsulate Field->ok->apply.
The property code will appear as follows-

namespace MridulFruitsBusiness
{
    public class Bucket
    {
        private string ownerName;
        public string OwnerName
        {
            get { return ownerName; }
            set { ownerName = value; }
        }
     }
}

try to Explore the other pre built items in the refactor menu for methods & others.

when you are developing a enterprise application there may be 100 or more methods
of a class.as a good developer you should let the other coders or users of your
methods about 'what is the task or properties of the methods'.u can use comments
for that.whenever users place the cursor on the method name the respective
comments will be shown so that they know what it does.
these comments are written just before the methods definition by writing '/' three
times as below -

namespace MridulFruitsBusiness
{
public class KeepInBucket
    {
        ///
        /// it keeps the fruits in the bucket by calculation..extra..extra
        ///

        ///
        ///
        ///
        ///
        public string KeepFruits(int value, int keepValue, Bucket bucketObj)
        {
        }
     } 
}
also explore the other type of comments.

Sunday, November 29, 2009

how to use arraylist - arraylist example

here i am going to write a program which shows example of arraylist.
think in this case that i am using arraylist to associate each
student with courses taken.

arraylists are used for collection type purposes.so it is used
widely.

program codes are following-
public class Course
    {
        private string name;
        public string Name
        {
            get { return name; }
            //set { name = value; }
        }
        public Course(string name) {
            this.name = name;
        }
        public string Output()
        {
             return "Course Name : "+ name + " ";
        }
    }
public class Student
    {
        private string name;
        public string Name
        {
            get { return name; }
        }
        private ArrayList courseTaken = new ArrayList();
        public ArrayList CourseTaken
        {
            get { return courseTaken; }
            //set { courseTaken = value; }
        }      
        public Student(string name) {
            this.name = name;      
        }
        public string Output() {
            return "Student Name : "+ name + "\n";
        }
    }
here is the entry form::
public partial class MridulExampleUi : Form
    {
        public MridulExampleUi()
        {
            InitializeComponent();
        }      
        private void MridulExampleUi_Load(object sender, EventArgs e)
        {}
        private void ShowArraylistButton_Click(object sender, EventArgs e)
        {       
            Student studentObj = new Student("mridul");
            Student studentObj3 = new Student("someone");
            Course courseObj1 = new Course("Programming");
            Course courseObj2 = new Course("Web designing");                
            studentObj.CourseTaken.Add(courseObj1);
            studentObj.CourseTaken.Add(courseObj2);
            studentObj3.CourseTaken.Add(courseObj1);         
            ArrayList arrayObj = new ArrayList();
            arrayObj.Add(studentObj);
            arrayObj.Add(studentObj3);          

            string message="";
            foreach (Student studentObj2 in arrayObj)
            {
                message+=studentObj2.Output();
                foreach(Course courseObj3 in studentObj2.CourseTaken)
                {
                  message+=courseObj3.Output();\                     
                }
                message += "\n\n";
            }
            MessageBox.Show(message);          
        }}
here is the program entry class::
static class Program
    {
        ///
        /// The main entry point for the application.
        ///

        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MridulExampleUi());
        }
    }

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger