Пример #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Investigation_Interview t = new Investigation_Interview();

            t.Investigation_Interview_Interviewer_ID = Interviewertxt.Text;
            t.Investigation_Interview_Interviewee_ID = intervieweetxt.Text;
            t.Case_ID = Convert.ToInt32(casetxt.Text);
            t.Investigation_Interview_Date     = Convert.ToDateTime(Datetxt.Text);
            t.Investigation_Interview_Location = locationtxt.Text;
            t.Investigation_Interview_Time     = Timetxt.Text;
            t.Investigation_Interview_Memo     = Memotxt.Text;

            db.Investigation_Interview.Add(t);

            int res = db.SaveChanges();

            if (res > 0)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
        }
        protected void Button1_Click1(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();


            Evidence evid = new Evidence();

            evid.Evidence_Date     = Convert.ToDateTime(datetxt.Text);
            evid.Evidence_Details  = Detailstxt.Text;
            evid.Case_ID           = /*Convert.ToInt32(casetxt.Text);*/ Convert.ToInt32(CaseIDlb.Text);
            evid.Evidence_Document = FileUpload1.FileBytes;
            evid.Requester_ID      = RequesterIDlb.Text;
            evid.Evidence_Type     = RadioButtonList1.Text;

            db.Evidences.Add(evid);

            int res = db.SaveChanges();

            if (res > 0)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
        }
Пример #3
0
        protected void evidsubmitbtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Evidence_Request evid = new Evidence_Request();

            evid.Evidence_Request_Details = evidtxt.Text;
            evid.Case_Handler             = chtxt.Text;
            evid.Employee = emptxt.Text;
            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)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
        }
Пример #4
0
        protected void iisendbtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Interview_Invite i = new Interview_Invite();

            i.Interview_Invitation_Date      = Convert.ToDateTime(iidatetxt.Text);
            i.Interview_Invitation_Date_Sent = Convert.ToDateTime(iidatesenttxt.Text);
            i.Interview_Invitation_Invitee   = iiemptxt.Text;
            i.Interview_Invitation_Location  = iilocationtxt.Text;
            i.Interview_Invitation_Time      = iiTimetxt.Text;
            i.Interview_Invitation_Details   = iiDetailstxt.Text;
            i.Case_Handler_ID = iichtxt.Text;
            i.Case_ID         = Convert.ToInt32(iicasetxt.Text);

            db.Interview_Invite.Add(i);

            int res = db.SaveChanges();

            if (res > 0)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
        }
Пример #5
0
        protected void isavebtn_Click(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 db = new Investigation_management_systemEntities4();

            Investigation_Interview t = new Investigation_Interview();

            t.Investigation_Interview_Interviewer_ID = Interviewertxt.Text;
            t.Investigation_Interview_Interviewee_ID = intervieweetxt.Text;
            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)
            {
                Response.Write("Data Inserted Successfully");
            }
            else
            {
                Response.Write("Try Again!!!");
            }
        }
        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(interviewtxt.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!!!");
            }
        }
        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);
                }

                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();
                    Response.Redirect("EmployeeHP.aspx?name=" + query_empName);
                }
            }

            else
            {
                lbMessage.Text = "Invalid username or password";
            }
        }
        protected void Button1_Click1(object sender, EventArgs e)
        {
            Investigation_management_systemEntities4 te = new Investigation_management_systemEntities4();


            InvestigationCase1 c = new InvestigationCase1();

            //Requester r = new Requester();

            //Evidence evid = new Evidence();

            //r.R_Employee_ID = requestertxt.Text;
            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);
            //evid.Evidence_Details = evidendetxt.Text;


            //add entity to the add method

            //te.courses.Add(c);
            //te.studs.Add(st);


            te.InvestigationCase1.Add(c);
            //te.Requesters.Add(r);
            //te.Evidences.Add(evid);



            //insert it into table
            int res = te.SaveChanges();

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

            int    newID       = c.Case_ID;
            string requesterID = c.Requester_ID;

            Response.Write(newID);

            Response.Redirect("Evidence.aspx?CaseID=" + newID + requesterID);
        }
Пример #9
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     = Convert.ToInt32(trCasetxt.Text);
            tr.Employee_ID = trEmptxt.Text;

            db.Termination_Requests.Add(tr);

            int res = db.SaveChanges();

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