private void WriteBarthelInfo(int id) { clsBarthelIndex clsbi = new clsBarthelIndex(id); var barthel_info = clsbi.GetLatestBarthelInfo(); this.gv_barthelindex.DataSource = barthel_info.Item3; this.gv_barthelindex.DataBind(); this.gv_PastBarthelInfo.DataSource = clsbi.GetPastBarthelDataTable(id); this.gv_PastBarthelInfo.DataBind(); this.TB_BarthelScore.Text = barthel_info.Item2.ToString() + "/" + barthel_info.Item1.ToString(); TableCell tc = new TableCell(); TableRow tr = new TableRow(); tbl_base_barthelinfo.Rows.Add(tr); }
protected void cmb_InsertBarthelInfo_Click(object sender, EventArgs e) { string war_mess = string.Empty; if (IsCheckAllQuestion() == false) { la_insertState.Text = "答えていない質問が有ります"; return; } DateTime measure_dt = DateTime.Parse(tb_measure_dt.Text.ToString()); clsBarthelIndex clsbi = new clsBarthelIndex(user_id); int active_barthel_id = clsbi.InsertBarthelIndexList(measure_dt, user_id, ref war_mess); if (active_barthel_id == 0) { la_insertState.Text = war_mess; } else { ListItem li = (ListItem)lst_question1.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 1, int.Parse(li.Value.ToString())); li = (ListItem)lst_question2.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 2, int.Parse(li.Value.ToString())); li = (ListItem)lst_question3.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 3, int.Parse(li.Value.ToString())); li = (ListItem)lst_question4.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 4, int.Parse(li.Value.ToString())); li = (ListItem)lst_question5.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 5, int.Parse(li.Value.ToString())); li = (ListItem)lst_question6.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 6, int.Parse(li.Value.ToString())); li = (ListItem)lst_question7.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 7, int.Parse(li.Value.ToString())); li = (ListItem)lst_question8.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 8, int.Parse(li.Value.ToString())); li = (ListItem)lst_question9.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 9, int.Parse(li.Value.ToString())); li = (ListItem)lst_question10.SelectedItem; clsbi.InsertBarthelIndexScore(active_barthel_id, 10, int.Parse(li.Value.ToString())); la_insertState.Text = "登録が完了しました(3秒後にこのページを閉じます)"; System.Text.StringBuilder script = new System.Text.StringBuilder(); script.Append("<script language='javascript'>\n"); script.Append("self.opener = self;\n"); script.Append("self.close();\n"); script.Append("</script>\n"); // // JavaScriptを登録する。 // this.Page.RegisterClientScriptBlock("SetText", script.ToString()); } }