예제 #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!!!");
            }
        }
예제 #2
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!!!");
            }
        }