Beispiel #1
0
        protected void isavebtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Interview_Memo t = new Interview_Memo();

            t.Investigation_Interview_ID = Convert.ToInt32(CaseIDlb.Text);



            t.Investigation_Interview_Memo = imemotxt.Text;

            db.Interview_Memo.Add(t);


            int res = db.SaveChanges();

            if (res > 0)
            {
                LabelInterview.Text = "Data Inserted Successfully";
            }
            else
            {
                LabelInterview.Text = "Try Again!!!";
            }


            //Response.Write(newID);
            //Response.Redirect("QandA.aspx?Investigation_Interview_ID =" + newID);
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            QuestionsAnswer qa = new QuestionsAnswer();


            //c.Requester_ID = requestertxt.Text;
            //c.Employee_ID = accusedtxt.Text;
            //c.Case_Details = casedetailstxt.Text;
            //c.Case_Start_Date = Convert.ToDateTime(datetxt.Text);
            //c.Case_Type = int.Parse(DropDownList1.SelectedValue);

            qa.Question_ID = int.Parse(DropDownList1.SelectedValue);
            qa.Investigation_Interview_ID = Convert.ToInt32(CaseIDlb.Text);
            qa.Answer_Details             = answertxt.Text;


            db.QuestionsAnswers.Add(qa);

            int res = db.SaveChanges();

            if (res > 0)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
            int newID = qa.Investigation_Interview_ID;

            Response.Redirect("Interviewmemo.aspx?CaseID=" + newID);
        }
        protected void iisendbtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Interview_Invite i = new Interview_Invite();

            //var userinfo = (from a in db.Employees
            //                where a.Employee_ID == iichtxt.Text
            //                select new LoginRecords
            //                {
            //                    UserID = a.Employee_ID,

            //                }).FirstOrDefault();

            i.Interview_Invitation_Date      = Convert.ToDateTime(iidatetxt.Text);
            i.Interview_Invitation_Date_Sent = Convert.ToDateTime(iidatesenttxt.Text);
            i.Interview_Invitation_Invitee   = EmpDropDownList.SelectedValue;
            i.Interview_Invitation_Location  = iilocationtxt.Text;
            i.Interview_Invitation_Time      = iiTimetxt.Text;
            i.Interview_Invitation_Details   = iiDetailstxt.Text;
            i.Case_Handler_ID = CHlbl.Text;
            i.Case_ID         = int.Parse(iiDropDownList.SelectedValue);

            db.Interview_Invite.Add(i);

            int res = db.SaveChanges();

            if (res > 0)
            {
                LabelInvite.Text = "Data Inserted Successfully";
            }
            else
            {
                LabelInvite.Text = "Try Again!!!";
            }

            //if (userinfo != null)
            //{
            //    int res = db.SaveChanges();

            //    if (res > 0)
            //    {

            //        LabelInvite.Text = "Data Inserted Successfully";

            //    }
            //    else
            //    {

            //        LabelInvite.Text = "Try Again!!!";

            //    }
            //}
            //else LabelInvite.Text = "Invalid username";
        }
Beispiel #4
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 te = new Investigation_management_systemEntities4();



            InvestigationCase1 c = new InvestigationCase1();

            //var userinfo = (from a in te.Employees
            //                where a.Employee_ID == requestertxt.Text
            //                select new LoginRecords
            //                {
            //                    UserID = a.Employee_ID,

            //                }).FirstOrDefault();



            c.Requester_ID    = Emplbl.Text;
            c.Employee_ID     = EmpDropDownList.SelectedValue;
            c.Case_Details    = casedetailstxt.Text;
            c.Case_Start_Date = Convert.ToDateTime(datetxt.Text);
            c.Case_Type       = int.Parse(DropDownList1.SelectedValue);
            //c.Case_Type = Convert.ToInt32(TextBox1.Text);



            te.InvestigationCase1.Add(c);



            //insert it into table

            int res = te.SaveChanges();

            if (res > 0)
            {
                Label7.Text = "Data Inserted Successfully";
            }
            else
            {
                Label7.Text = "Try Again!!!";
            }


            int newID = c.Case_ID;

            string requesterID = c.Requester_ID;

            //Response.Write(newID);

            //Response.Redirect("Evidence.aspx?CaseID=" + newID + requesterID);
            Response.Redirect(String.Format("Evidence.aspx?CaseID={0}&Requester_ID={1}", newID, requesterID));
            //Response.Redirect(String.Format("~/page2.aspx?x={0}&y={1}", p1.x, p1.y));
        }
Beispiel #5
0
        protected void trsavebtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Termination_Request tr = new Termination_Request();

            tr.Termination_Request_Date          = Convert.ToDateTime(trDatetxt.Text);
            tr.Termination_Request_Justification = Justificationtxt.Text;
            tr.Case_ID     = int.Parse(trDropDownList.SelectedValue);
            tr.Employee_ID = EmpDropDownList.SelectedValue;

            //var userinfo = (from a in db.Employees
            //                where a.Employee_ID == trEmptxt.Text
            //                select new LoginRecords
            //                {
            //                    UserID = a.Employee_ID,

            //                }).FirstOrDefault();

            db.Termination_Requests.Add(tr);

            int res = db.SaveChanges();

            if (res > 0)
            {
                LabelTermination.Text = "Data Inserted Successfully";
            }
            else
            {
                LabelTermination.Text = "Try Again!!!";
            }



            //if (userinfo != null)
            //{
            //    int res = db.SaveChanges();

            //    if (res > 0)
            //    {

            //        LabelTermination.Text = "Data Inserted Successfully";

            //    }
            //    else
            //    {

            //        LabelTermination.Text = "Try Again!!!";

            //    }

            //}
            //else LabelTermination.Text = "Invalid username";
        }
Beispiel #6
0
        protected void evidsubmitbtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Evidence_Request evid = new Evidence_Request();

            //var userinfo = (from a in db.Employees
            //                where a.Employee_ID == EmpDropDownList.SelectedValue
            //                select new LoginRecords
            //                {
            //                    UserID = a.Employee_ID,

            //                }).FirstOrDefault();

            evid.Evidence_Request_Details = evidtxt.Text;
            evid.Case_Handler             = CHlbl.Text;
            evid.Employee = EmpDropDownList.SelectedValue;
            evid.Case_ID  = int.Parse(casedropdownlist.SelectedValue);
            evid.evidence_request_date = Convert.ToDateTime(datetxt.Text);

            db.Evidence_Request.Add(evid);

            int res = db.SaveChanges();

            if (res > 0)
            {
                labelevid.Text = "Data Inserted Successfully";
            }
            else
            {
                labelevid.Text = "Try Again!!!";
            }

            //if (userinfo != null)
            //{
            //    int res = db.SaveChanges();

            //    if (res > 0)
            //    {

            //        labelevid.Text = "Data Inserted Successfully";

            //    }
            //    else
            //    {

            //        labelevid.Text = "Try Again!!!";

            //    }
            //}
            //else labelevid.Text = "Invalid User ID";
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();



            var total = (from o in db.InvestigationCase1
                         select o).Count();

            lb1.Text = total.ToString();

            var ia = (from o in db.InvestigationCase1
                      where o.Case_Type >= 9 && o.Case_Type <= 15
                      select o).Count();

            lb2.Text = ia.ToString();

            var hr = (from o in db.InvestigationCase1
                      where o.Case_Type >= 1 && o.Case_Type <= 8
                      select o).Count();

            lb3.Text = hr.ToString();

            var complete = (from o in db.InvestigationCase1
                            where o.Case_Status == 1
                            select o).Count();

            lb5.Text = complete.ToString();

            var newcase = (from o in db.InvestigationCase1
                           where o.Case_Status == 4
                           select o).Count();

            lb6.Text = newcase.ToString();

            var open = (from o in db.InvestigationCase1
                        where o.Case_Status == 3
                        select o).Count();

            lb4.Text = open.ToString();
        }
Beispiel #8
0
        protected void inextbtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Investigation_Interview t = new Investigation_Interview();

            //var userinfo = (from a in db.Employees
            //                where a.Employee_ID == Interviewertxt.Text
            //                select new LoginRecords
            //                {
            //                    UserID = a.Employee_ID,

            //                }).FirstOrDefault();



            t.Investigation_Interview_Interviewer_ID = CHlbl.Text;
            t.Investigation_Interview_Interviewee_ID = EmpDropDownList.SelectedValue;
            t.Case_ID = int.Parse(iDropDownList.SelectedValue);
            t.Investigation_Interview_Date     = Convert.ToDateTime(idatetxt.Text);
            t.Investigation_Interview_Location = ilocationtxt.Text;
            t.Investigation_Interview_Time     = itimetxt.Text;
            //t.Investigation_Interview_Memo = imemotxt.Text;

            db.Investigation_Interview.Add(t);

            int res = db.SaveChanges();

            if (res > 0)
            {
                LabelInterview.Text = "Data Inserted Successfully";
            }
            else
            {
                LabelInterview.Text = "Try Again!!!";
            }



            //if (userinfo != null)
            //{
            //    int res = db.SaveChanges();

            //    if (res > 0)
            //    {

            //        LabelInterview.Text = "Data Inserted Successfully";

            //    }
            //    else
            //    {

            //        LabelInterview.Text = "Try Again!!!";


            //    }
            //}
            /*else LabelInterview.Text = "Invalid username"*/
            int newID = t.Investigation_Interview_ID;


            Response.Redirect("QandA.aspx?CaseID=" + newID);

            //Response.Write(newID);
            //Response.Redirect("QandA.aspx?Investigation_Interview_ID =" + newID);
        }
Beispiel #9
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();



            //string query_empID = (from c in db.Employees
            //                      where c.Employee_ID == txtUserName.Text && c.Password == txtPWD.Text
            //                      select c.Employee_ID).FirstOrDefault();

            //int temp = Convert.ToInt32(query_empID.ToString());

            //if (temp != 0)
            //{
            //    lbMessage.Text = "";
            //    string query_empName = (from x in db.Employees
            //                            where x.Employee_ID == query_empID
            //                            select x.First_Name + " " + x.Last_Name).FirstOrDefault();

            //    Response.Redirect("CaseRequest.aspx?name=" + query_empName);
            //    //Response.Redirect("Homepage.aspx?name=" + query_empName);
            //}

            var userinfo = (from c in db.Employees
                            where c.Employee_ID == txtUserName.Text && c.Password == txtPWD.Text
                            select new LoginRecords
            {
                UserID = c.Employee_ID,
                UserPassword = c.Password,
                UserType = c.Employee_Type
            }).FirstOrDefault();

            if (userinfo != null)
            {
                lbMessage.Text = "";
                if (userinfo.UserType == "Ch")
                {
                    string query_chEmpName = (from x in db.Employees
                                              where x.Employee_ID == userinfo.UserID
                                              select x.First_Name + " " + x.Last_Name).FirstOrDefault();
                    //Response.Redirect("Homepage.aspx?name=" + query_chEmpName);
                    //string empID = userinfo.UserID;
                    //Response.Redirect(String.Format("Homepage.aspx?name={0}&emp_ID={1}", query_chEmpName, empID));
                    Session["empID"] = txtUserName.Text;
                    Session["name"]  = query_chEmpName;
                    Response.Redirect("Homepage.aspx");
                }

                else if (userinfo.UserType == "Em")
                {
                    string query_empName = (from x in db.Employees
                                            where x.Employee_ID == userinfo.UserID
                                            select x.First_Name + " " + x.Last_Name).FirstOrDefault();

                    Session["emID"] = txtUserName.Text;
                    Session["name"] = query_empName;
                    Response.Redirect("EmployeeHP.aspx");
                    //Response.Redirect("EmployeeHP.aspx?name=" + query_empName);
                }
            }

            else
            {
                lbMessage.Text = "Invalid username or password";
            }
        }