Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srinivaskiranpuli #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions AddProject.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.example.bugtracking;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class AddProject extends Activity {
Button Sub;
TextView MID,EID;
EditText Pname,Type,pdes;
SQLiteDatabase db;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_project);
final Globalclass globalvariable=(Globalclass)getApplicationContext();
MID=(TextView)findViewById(R.id.textView1);
MID.setText(globalvariable.GetUserName().toString());

Sub=(Button)findViewById(R.id.Ps);
pdes=(EditText)findViewById(R.id.editText1);
MID=(TextView)findViewById(R.id.MID);

Pname=(EditText)findViewById(R.id.Pn);
Type=(EditText)findViewById(R.id.Type);

db=openOrCreateDatabase("bug", Context.MODE_PRIVATE, null);
db.execSQL("create table if not exists ap(Pname varchar,Type varchar);");
db.execSQL("create table if not exists Managemenst(Id varchar,Password varchar,Email varchar,MobileNumber vachar)");

Sub.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(Pname.getText().toString().trim().length()==0)
{
Toast.makeText(AddProject.this,"enter all fields",Toast.LENGTH_SHORT).show();
return;

}
db.execSQL("insert into ap values('"+Pname.getText()+"','"+Type.getText()+"')");
Toast.makeText(AddProject.this,"Submit",Toast.LENGTH_SHORT).show();
}
});
}





public void showMessage(String title,String message)
{
Builder builder=new Builder(this);
builder.setCancelable(true);
builder.setTitle(title);
builder.setMessage(message);
builder.show();
}
}


























74 changes: 74 additions & 0 deletions Adminhome.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package com.example.bugtracking;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Adminhome extends Activity {
Button mi,ti,di,pi,lo;
TextView aid;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin_home);
aid=(TextView)findViewById(R.id.Aid);
mi=(Button)findViewById(R.id.Mi);
ti=(Button)findViewById(R.id.Ti);
di=(Button)findViewById(R.id.Di);
pi=(Button)findViewById(R.id.Pi);
lo=(Button)findViewById(R.id.Alogout);

mi.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i1=new Intent(Adminhome.this,ManagementInformation.class);
startActivity(i1);
}
});

ti.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i2=new Intent(Adminhome.this,TestInformation.class);
startActivity(i2);
}
});
di.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i3=new Intent(Adminhome.this,DevelopmentInformation.class);
startActivity(i3);
}
});
pi.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i4=new Intent(Adminhome.this,ProjectInformation.class);
startActivity(i4);
}
});
lo.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent i5=new Intent(Adminhome.this,Loginpage.class);
startActivity(i5);
}
});

}
}


101 changes: 101 additions & 0 deletions Bs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package com.example.bugtracking;

import java.util.ArrayList;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class Bs extends Activity {
ImageView out;
TextView Bug;
SQLiteDatabase db;
ListView l;
EditText t1;
ArrayList<String> list1;
ArrayAdapter adapter;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bs);
final Globalclass globalvariabel = (Globalclass)getApplicationContext();
Bug=(TextView)findViewById(R.id.tid);
Bug.setText(globalvariabel.GetUserName().toString());
out=(ImageView)findViewById(R.id.imageView1);
t1=(EditText)findViewById(R.id.search);
db=openOrCreateDatabase("bug", Context.MODE_PRIVATE, null);
db.execSQL("create table if not exists bugdes(tid varchar,bid varchar,sp varchar,bd varchar) ");

l = (ListView) findViewById(R.id.listView1);
final ArrayList<String> list = new ArrayList<String>();
list1 = new ArrayList<String>();
Cursor res=db.rawQuery("SELECT * FROM bugdes", null);
if(res.getCount()!=0)
{
while (res.moveToNext())
{
list.add("Tester Id : "+res.getString(0)+"\n"+" Bug Id:"+res.getString(1)+"\n"+"Type: "+res.getString(2)+"\n"+"deatils: "+res.getString(3)+"\n");
list1.add(res.getString(0));
}
}
adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,list);
l.setAdapter(adapter);


// (close)

/// search (start)

t1.addTextChangedListener(new TextWatcher(){

@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub

}

@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub

}

@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) {
// TODO Auto-generated method stub
Bs.this.adapter.getFilter().filter(s);

}

});
l.setAdapter(adapter);


}
//
///logout

public void showMessage(String title,String message)
{
Builder builder=new Builder(this);
builder.setCancelable(true);
builder.setTitle(title);
builder.setMessage(message);
builder.show();
}


}

Loading