Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
1) You have to make a compliant register.
Compliants(CompliantID,Comp.Date,IpAdress,ProblemDesc,Resp)
Compliant ID to be generated automatically as… If Resp. is Management Start with M001 like that..
If Network Person is responsible start with N001 if Others are responsible start with O001 like that.
Task 2 :
______
Create a table as Resolved. And take ur own fields. Once the compliant get resolved, the the record to be moved from Complaints to Resolve.
Task 3:
Make a form as dashboard, and display all complaints in the data grid.
If any compliant not resolved in 7days time, that record to be displayed in Red color.
Coding Standards
1) All Script Files
2) To be used stored procedures.
3) Front-end code must be in business object, not in the events.
4) Naming Standards to be implemented strictly.

/*this is class file  */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;

namespace compliants
{

    #region class compliants

    class compliants
    {
        #region variables
        SqlConnection connection;
         SqlCommand command;
        SqlDataReader dr;
      
        #endregion variables

        #region properties
        public int ID
        { get;
          set; 
        }
        public string compliantID
        {
            get;
            set;
        }
        public DateTime compliantDate
        {
            get;
            set;
        }
        public string IpAddress
        {
            get;
            set;
        }
        public string ProblemDescription
        {
            get;
            set;
        }
       
        public string Responsibility
        {
            get;
            set;

        }
       
       
        #endregion properties


        #region methods
        public void Savecompliants(compliants objcompliants)
        {
            
            compliantID = objcompliants.compliantID;
           compliantDate = objcompliants.compliantDate;
            IpAddress = objcompliants.IpAddress;
            ProblemDescription = objcompliants.ProblemDescription;
            Responsibility = objcompliants.Responsibility;
        }
      
     /*   public string GenerateID(String compliantID)
        {

            connection = connectionHelper.GetConnection();
            SqlCommand cmd = new SqlCommand("select top 1 CompliantID from Compliants where CompliantID like '" + compliantID + "%' order by ID DESC",connection);
            connection.Open();
            string c = compliantID;

            object b = command.ExecuteScalar();
            string num = "";
            if (b == null)
            {
                num = c + "001";
            }
            else
            {

               num = b.ToString();
                int n=Convert.ToInt32(num.Substring(1,num.Length-1));
                n++;
                if (n >= 1 && n <= 9)
                   num = c+"00"+n;
                if (n >= 10 && n <= 99)
                    num = c+"0"+n;
                if (n >= 100 && n <= 999)
                   num = c+n;
               }
            connection.Close();
            return compliantID;
        }*/
        public string Insertcompliants()
        { 
          
            connection = connectionHelper.GetConnection();
             command = new SqlCommand("proccomplaint", connection);
             connection.Open();
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.AddWithValue("@compliantID",compliantID);
            command.Parameters.AddWithValue("@CompliantDate",compliantDate);
            command.Parameters.AddWithValue("@IpAddress",IpAddress);
            command.Parameters.AddWithValue("@ProblemDescription",ProblemDescription);
            command.Parameters.AddWithValue("@Responsibility",Responsibility);
           
            command.ExecuteNonQuery();
           
            string compliantid =Convert.ToString(command.Parameters["@CompliantID"].Value);
            return compliantid;
        }
        #endregion methods
    }

    #endregion class compliants

}

/*presentation layer */

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

namespace compliants
{
    public partial class Form1 : Form
    {
        
        public Form1()
        {
            InitializeComponent();
        }

        
        private void btnRegister_Click(object sender, EventArgs e)
        {
            compliants objcompliants = new compliants();

            objcompliants.compliantID = txtCompliantID.Text;
            objcompliants.compliantDate = dtpCompliantDate.Value;
            objcompliants.IpAddress = txtIpAddress.Text;
            objcompliants.ProblemDescription = txtDescription.Text;
            objcompliants.Responsibility = cmbResponsibility.Text;


            compliants obj = new compliants();
            obj.Savecompliants(objcompliants);
            string compliantid = obj.Insertcompliants();
            txtCompliantID.Text = compliantid;
            MessageBox.Show("success");

        

        }
  
      /*  public void cmbResponsibility_SelectedIndexChanged(object sender, EventArgs e)
        {

              compliants objcompliants = new compliants();

              compliants obj = new compliants();
          
           
                         
           
            if (cmbResponsibility.Text == "Select UserType")
            {
                MessageBox.Show("Please select user !");
            }
            else if (cmbResponsibility.SelectedIndex == 0)
            {
               txtCompliantID.Text= "M";
            }
            else if (cmbResponsibility.SelectedIndex == 1)
            {
                txtCompliantID.Text ="N";
            }
            else
            {
                txtCompliantID.Text ="O";
            }

            obj.GenerateID(txtCompliantID.Text);
        }*/
               
    }
}
Posted
Updated 15-Jan-12 17:12pm
v4

Sorry, but this forum is not here so you can get someone else to do your home or course work for you. Go and try on your own, and come back here when you have a specific technical question.
 
Share this answer
 
We don't do home work - it is set for a reason - also please note that your lecturer may be a member here.

If you get stuck with something in particular post your code etc and people will be happy to help.
 
Share this answer
 
Hey at least try something your self, so we can help you to move on..this is not acceptable, try something and if you need help in that, then we are here to help you..
All the best.
 
Share this answer
 
Comments
ravivangala 13-Jan-12 7:37am    
i tried a lot but couldn't find solution...
ChandraRam 13-Jan-12 7:40am    
Then post code that you tried and ask for help with specific bits - you should not expect to get the complete project's code done for you.
ravivangala 13-Jan-12 7:42am    
/*this is class file */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Text;

namespace compliants
{

#region class compliants

class compliants
{
#region variables
SqlConnection connection;
SqlCommand command;
SqlDataReader dr;

#endregion variables

#region properties
public int ID
{ get;
set;
}
public string compliantID
{
get;
set;
}
public DateTime compliantDate
{
get;
set;
}
public string IpAddress
{
get;
set;
}
public string ProblemDescription
{
get;
set;
}

public string Responsibility
{
get;
set;

}


#endregion properties


#region methods
public void Savecompliants(compliants objcompliants)
{

compliantID = objcompliants.compliantID;
compliantDate = objcompliants.compliantDate;
IpAddress = objcompliants.IpAddress;
ProblemDescription = objcompliants.ProblemDescription;
Responsibility = objcompliants.Responsibility;
}

/* public string GenerateID(String compliantID)
{

connection = connectionHelper.GetConnection();
SqlCommand cmd = new SqlCommand("select top 1 CompliantID from Compliants where CompliantID like '" + compliantID + "%' order by ID DESC",connection);
connection.Open();
string c = compliantID;

object b = command.ExecuteScalar();
string num = "";
if (b == null)
{
num = c + "001";
}
else
{

num = b.ToString();
int n=Convert.ToInt32(num.Substring(1,num.Length-1));
n++;
if (n >= 1 && n <= 9)
num = c+"00"+n;
if (n >= 10 && n <= 99)
num = c+"0"+n;
if (n >= 100 && n <= 999)
num = c+n;
}
connection.Close();
return compliantID;
}*/
public string Insertcompliants()
{

connection = connectionHelper.GetConnection();
command = new SqlCommand("proccomplaint", connection);
connection.Open();
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@compliantID",compliantID);
command.Parameters.AddWithValue("@CompliantDate",compliantDate);
command.Parameters.AddWithValue("@IpAddress",IpAddress);
command.Parameters.AddWithValue("@ProblemDescription",ProblemDescription);
command.Parameters.AddWithValue("@Responsibility",Responsibility);

command.ExecuteNonQuery();

string compliantid =Convert.ToString(command.Parameters["@CompliantID"].Value);
return compliantid;
}
#endregion methods
}

#endregion class compliants

}
ravivangala 13-Jan-12 7:44am    
/*presentation layer */

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

namespace compliants
{
public partial class Form1 : Form
{

public Form1()
{
InitializeComponent();
}


private void btnRegister_Click(object sender, EventArgs e)
{
compliants objcompliants = new compliants();

objcompliants.compliantID = txtCompliantID.Text;
objcompliants.compliantDate = dtpCompliantDate.Value;
objcompliants.IpAddress = txtIpAddress.Text;
objcompliants.ProblemDescription = txtDescription.Text;
objcompliants.Responsibility = cmbResponsibility.Text;


compliants obj = new compliants();
obj.Savecompliants(objcompliants);
string compliantid = obj.Insertcompliants();
txtCompliantID.Text = compliantid;
MessageBox.Show("success");



}

/* public void cmbResponsibility_SelectedIndexChanged(object sender, EventArgs e)
{

compliants objcompliants = new compliants();

compliants obj = new compliants();




if (cmbResponsibility.Text == "Select UserType")
{
MessageBox.Show("Please select user !");
}
else if (cmbResponsibility.SelectedIndex == 0)
{
txtCompliantID.Text= "M";
}
else if (cmbResponsibility.SelectedIndex == 1)
{
txtCompliantID.Text ="N";
}
else
{
txtCompliantID.Text ="O";
}

obj.GenerateID(txtCompliantID.Text);
}*/

}
}
Prasad_Kulkarni 15-Jan-12 23:14pm    
Okay that's good..now tell me what error you getting..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900