// 回答ボタンクリック protected void btn_Kaito_Click(Object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { string event_code = ""; if (ckBoxFmc.SelectedIndex > -1) { event_code = ckBoxFmc.SelectedItem.Value; } else { if (ckBoxmc.SelectedIndex > -1) { event_code = ckBoxmc.SelectedItem.Value; } } Session[Const.Def.DefPARA_FOLLOW] = event_code; openWindow(); // フォロー情報回答画面オープン } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollow", "btn_Kaito_Click", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } CommonLogic bcom = new CommonLogic(); try { Boolean bRet = false; ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { arrayMessage.Add(Const.Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // ファイルパス取得 string prm = Request.QueryString.Get(Const.Def.DefPDF_FileNo).Trim().Replace("<>", "\\"); filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["LinkForder"] + prm; string[] strTitle = filePath.Split('\\'); title = strTitle[strTitle.Length - 1].Trim(); // ファイル存在チェック if (!File.Exists(filePath)) { arrayMessage.Add(Const.Def.DefMsg_FILE_NOTFOUND); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // Bravaセッション取得 BravaConnection conn = Providers.Connection.Create("http://" + System.Web.Configuration.WebConfigurationManager.AppSettings["Brava"]); sessionId = conn.GetSessionID(); Page.DataBind(); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmDetail", "Page_Load", ex, this.Response); } }
/// <summary> /// 再描画ボタン押下処理 /// </summary> protected void btnShow_Click(object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { Response.Redirect("frmTopPage.aspx"); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "btnShow_click", ex, this.Response); } }
// TOPページへクリック protected void lnkTop_Click(Object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { Response.Redirect("frmTopPage.aspx", false); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollow", "lnkTop_Click", ex, this.Response); } }
/// <summary> /// 群馬掲示板編集ボタン押下 /// </summary> protected void btnTopicGunma_click(object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { saveTxt("txtFileTopicGunma"); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "btnTopicGunma_click", ex, this.Response); } }
/// <summary> /// テキストファイル保存処理 /// </summary> protected void saveTxt(string sight) { CommonLogic bcom = new CommonLogic(); try { string txtSight = sight; string folderPath = System.Web.Configuration.WebConfigurationManager.AppSettings[txtSight]; string filePath = HttpContext.Current.Server.MapPath(folderPath); System.Text.Encoding enc = System.Text.Encoding.GetEncoding("SHIFT_JIS"); System.IO.StreamWriter sr = new System.IO.StreamWriter(filePath, false, enc); string upData; if (sight.Equals("txtFileCommon")) { upData = txtCommon.Text.ToString(); } else if (sight.Equals("txtFileTopicTokyo")) { upData = txtTopicTokyo.Text.ToString(); } else if (sight.Equals("txtFileTopicGunma")) { upData = txtTopicGunma.Text.ToString(); } else { upData = ""; } sr.Write(upData); sr.Close(); System.Text.StringBuilder script = new System.Text.StringBuilder(); script.Append("<script language='javascript'>"); script.Append("window.alert('更新完了');"); script.Append("var url = document.getElementById('hdnPageUrl').value;"); script.Append("location.href = url;"); script.Append("</script>"); RegisterStartupScript("save complete bbord", script.ToString()); //Response.Redirect(Request.FilePath, false); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "saveTxt", ex, this.Response); } }
// 表示クリック protected void btn_Disp_Click(Object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { gbStartPage = 0; hdKacode.Value = txtKacode.Text.ToString().Trim(); DispDataGet(); // 画面表示データ取得処理 } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollowAnswer", "btn_Disp_Click", ex, this.Response); } }
/// <summary> /// 背景変更ボタン押下 /// </summary> protected void btn_ChangeImage_Click(object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { Response.Redirect("frmChangeImage.aspx", false); //frmChangeImage frmChangeImageObj; // 子フォーム //frmChangeImageObj = new frmChangeImage(); // 子フォーム生成 //frmChangeImageObj.SetFocus(); // 子フォームを表示 } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "btn_ChangeImage_Click", ex, this.Response); } }
/// <summary> /// インデックス変更処理 /// </summary> public void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e) { CommonLogic bcom = new CommonLogic(); //Get the currently selected item in the ListBox. string curItem = ListBox1.SelectedValue; try { String infoImagePath, fldSight = ""; fldSight = "fileImages"; infoImagePath = System.Web.Configuration.WebConfigurationManager.AppSettings[fldSight]; string txtInfo = HttpContext.Current.Server.MapPath(infoImagePath); string strImagePath = txtInfo; File.Copy(curItem, strImagePath, true); this.Dispose(); //自分自身のフォームを閉じる 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()); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "btn_ChangeImage_Click", ex, this.Response); } this.Dispose(); }
/// <summary> /// 画面ロード処理 /// </summary> protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } CommonLogic bcom = new CommonLogic(); ListBox1.ClearSelection(); try { String infoFilePath, fldSight = ""; fldSight = "fldChangeImage"; infoFilePath = System.Web.Configuration.WebConfigurationManager.AppSettings[fldSight]; string txtInfo = HttpContext.Current.Server.MapPath(infoFilePath); //ChangeImageフォルダ内のファイルをすべて取得する System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(txtInfo); IEnumerable <System.IO.FileInfo> files = di.EnumerateFiles("*", System.IO.SearchOption.AllDirectories); //ファイル名を列挙する foreach (System.IO.FileInfo f in files) { ListBox1.Items.Add(new ListItem(f.Name, f.FullName)); } } catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "btn_ChangeImage_Click", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } CommonLogic bcom = new CommonLogic(); try { Boolean bRet = false; string stFmcMc = ""; string stKaihatsuId = ""; string stByPu = ""; string stEventNo = ""; string stFollowNo = ""; string stKaCode = ""; string stSystemNo = ""; // 引数:フォローキー情報 try { stFmcMc = Request.QueryString.Get(Const.Def.DefPARA_FMCMC).Trim(); stKaihatsuId = Request.QueryString.Get(Const.Def.DefPARA_KAIHATSUID).Trim(); stByPu = Request.QueryString.Get(Const.Def.DefPARA_BYPU).Trim(); stEventNo = Request.QueryString.Get(Const.Def.DefPARA_EVENTNO).Trim(); stFollowNo = Request.QueryString.Get(Const.Def.DefPARA_FOLLOWNO).Trim(); stKaCode = Request.QueryString.Get(Const.Def.DefPARA_KACODE).Trim(); stSystemNo = Request.QueryString.Get(Const.Def.DefPARA_SYSTEMNO).Trim(); if (stFmcMc == "" || stFmcMc == null) { bRet = true; } } catch (Exception) { bRet = true; } // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { errorMessage(Const.Def.DefMsg_USERERR); return; } // 他部署フォローデータ取得 BuisinessLogic.BLAnswerSubWindow bAnswer = new BuisinessLogic.BLAnswerSubWindow(); gbFollowDataOtherDept = bAnswer.GetFollowDataOtherDept(stFmcMc, stKaihatsuId, stByPu, stEventNo, stFollowNo, stKaCode, stSystemNo); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmAnswerSubWindow", "Page_Load", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時、回答画面の戻り以外はリターン if (IsPostBack == true) { // 回答更新後のリフレッシュ if (hdSubmit.Value == "1") { DispDataGet(); // 画面表示データ取得処理 } return; } CommonLogic bcom = new CommonLogic(); try { String[] strArrayData; pnlFollowAnswer.Visible = false; String paraEventCode = (String)Session[Def.DefPARA_FOLLOW]; Boolean result = false; ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); // フォロー情報キー情報 if (paraEventCode == "" || paraEventCode == null) { btnDisp.Enabled = false; // 表示ボタン使用不可 arrayMessage.Add(Def.DefMsg_URLERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // Windowsログイン・ユーザマスタチェック result = bcom.CheckUser(); if (result) { btnDisp.Enabled = false; // 表示ボタン使用不可 arrayMessage.Add(Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // 作業対象部署にフォーカス txtKacode.Focus(); // HiddenField フィールドクリア hdPageNo.Value = "0"; strArrayData = paraEventCode.Trim().Split(','); ViewState["FMC_mc"] = strArrayData[0]; ViewState["KAIHATU_ID"] = strArrayData[1]; ViewState["BY_PU"] = strArrayData[2]; ViewState["EVENT_NO"] = strArrayData[3]; ViewState["FullEventName"] = strArrayData[4]; Session[Def.DefPARA_EVENTNM] = strArrayData[4]; ViewState["EventName"] = strArrayData[5]; // フォロー対象部署オートコンプリート処理 // 2017/07/14 Add getKaCodeData(ViewState["FMC_mc"].ToString(), ViewState["KAIHATU_ID"].ToString(), ViewState["BY_PU"].ToString(), ViewState["EVENT_NO"].ToString()); Session[Def.DefPARA_FOLLOW] = ""; // セッションクリア } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollowAnswer", "Page_Load", ex, this.Response); } }
// ダウンロードボタンクリック protected void btn_Download_Click(Object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { string event_code = ""; if (ckBoxFmc.SelectedIndex > -1) { event_code = ckBoxFmc.SelectedItem.Value; } else { if (ckBoxmc.SelectedIndex > -1) { event_code = ckBoxmc.SelectedItem.Value; } else { if (ckBoxOverFmc.SelectedIndex > -1) { event_code = ckBoxOverFmc.SelectedItem.Value; } else { if (ckBoxOvermc.SelectedIndex > -1) { event_code = ckBoxOvermc.SelectedItem.Value; } } } } BuisinessLogic.BLFollow bLogic = new BuisinessLogic.BLFollow(); DataTable followList = null; String paraTitle = ""; String[] strArrayData; strArrayData = event_code.Trim().Split(','); // 過去トラ一覧リスト取得 followList = bLogic.GetDownloadList(strArrayData[0], strArrayData[1], strArrayData[2], strArrayData[3], txtKacode.Text.Trim()); paraTitle = "《 " + strArrayData[4] + " 》段階結果( " + txtKacode.Text.Trim() + " )"; // TemplateのFileInfo EXCELテンプレートフルパス FileInfo template = new FileInfo(@bcom.GetExcelTemplate("F")); // 作成EXCELのFileInfo FileInfo newFile = new FileInfo(Const.Def.DefFollowExcelName + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx"); // EXCEL作成 using (ExcelPackage excelPkg = new ExcelPackage(newFile, template)) { ExcelWorksheet worksheet = null; worksheet = excelPkg.Workbook.Worksheets.Where(s => s.Name == Const.Def.DefFollowWorksheetName).FirstOrDefault(); //処理を記述 bLogic.CreateFollowList(worksheet, paraTitle, strArrayData[5], followList); // ダウンロード処理 String fn = Const.Def.DefFollowExcelName + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx"; Response.Clear(); Response.AddHeader("Content-Disposition", String.Format("attachment; filename=" + HttpUtility.UrlDecode(fn))); Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; Response.BinaryWrite(excelPkg.GetAsByteArray()); Response.Flush(); Response.End(); } } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollow", "btn_Download_Click", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } //CommonLogic bcom = new CommonLogic(); try { Boolean bRet = false; DataTable dtFollowData = null; string stFollowKey = ""; string stEventName = ""; String[] strArrayData; // 引数:フォローキー情報 try { stFollowKey = Request.QueryString.Get(Const.Def.DefPARA_FOLLOW).Trim(); stEventName = Request.QueryString.Get(Const.Def.DefPARA_EVENTNM).Trim(); if (stFollowKey == "" || stFollowKey == null) { bRet = true; } else { strArrayData = stFollowKey.Trim().Split(','); if (strArrayData.Length == 7) { ViewState["FMC_mc"] = strArrayData[0]; hdnFmcMc.Value = strArrayData[0]; ViewState["KAIHATU_ID"] = strArrayData[1]; hdnKaihatsuId.Value = strArrayData[1]; ViewState["BY_PU"] = strArrayData[2]; hdnByPu.Value = strArrayData[2]; ViewState["EVENT_NO"] = strArrayData[3]; hdnEventNo.Value = strArrayData[3]; ViewState["FOLLOW_NO"] = strArrayData[4]; hdnFollowNo.Value = strArrayData[4]; ViewState["KA_CODE"] = strArrayData[5]; hdnKaCode.Value = strArrayData[5]; ViewState["SYSTEM_NO"] = strArrayData[6]; hdnSystemNo.Value = strArrayData[6]; } else { bRet = true; } } } catch (Exception) { bRet = true; } if (bRet == true) { btnRegist.Enabled = false; pnlDetail.Visible = false; errorMessage(Const.Def.DefMsg_URLERR); return; } // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { pnlDetail.Visible = false; btnRegist.Enabled = false; errorMessage(Const.Def.DefMsg_USERERR); return; } // フォローデータ取得 BuisinessLogic.BLAnswer bAnswer = new BuisinessLogic.BLAnswer(); dtFollowData = bAnswer.GetFollowData(ViewState["FMC_mc"].ToString(), ViewState["KAIHATU_ID"].ToString(), ViewState["BY_PU"].ToString(), ViewState["EVENT_NO"].ToString(), ViewState["FOLLOW_NO"].ToString(), ViewState["KA_CODE"].ToString(), ViewState["SYSTEM_NO"].ToString()); if (dtFollowData.Rows.Count == 0) { pnlDetail.Visible = false; btnRegist.Enabled = false; errorMessage(Const.Def.DefMsg_DATA_NOTFOUND); return; } // 画面表示処理 initialDisp(dtFollowData, bcom.GetLinkForder()); lblKacode.Text = ViewState["KA_CODE"].ToString(); lblFollowInfo.Text = stEventName; txtAnswer.Focus(); ViewState["SHARED_YMD"] = dtFollowData.Rows[0]["SHARED_YMD"].ToString().Trim(); // 更新日時 } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmAnswer", "Page_Load", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } CommonLogic bcom = new CommonLogic(); try { Boolean bRet = false; // パラメータ取得 // HelpSerch:過去トラ検索用Helpファイル var fileKbn = ""; fileKbn = Request.QueryString.Get("VIEWFILE_KBN").Trim(); if (filePath == "" || filePath == null) { bRet = true; } ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { arrayMessage.Add(Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // ファイルパス取得 switch (fileKbn) { case "HelpSerch": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["HelpSerch"]; break; case "HelpFollow": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["HelpFollow"]; break; // 2017.04.03 ta_kanda 追加 Start case "HelpTop": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["HelpTop"]; break; case "QaTop": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["QaTop"]; break; // 2017.04.03 ta_kanda 追加 End // 2017.04.04 ta_kanda 追加 Start case "QaSerch": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["QaSerch"]; break; case "QaFollow": filePath = System.Web.Configuration.WebConfigurationManager.AppSettings["QaFollow"]; break; // 2017.04.04 ta_kanda 追加 End } string[] strTitle = filePath.Split('/'); title = strTitle[strTitle.Length - 1].Trim(); // ファイル存在チェック if (!File.Exists(filePath)) { arrayMessage.Add(Def.DefMsg_FILE_NOTFOUND); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // Bravaセッション取得 BravaConnection conn = Providers.Connection.Create("http://" + System.Web.Configuration.WebConfigurationManager.AppSettings["Brava"]); sessionId = conn.GetSessionID(); Page.DataBind(); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmClientView", "Page_Load", ex, this.Response); } }
/// <summary> /// 初期表示 /// </summary> protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } try { Boolean bRet = false; DataTable dtTrableData = null; string stKanriNo = ""; ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); Boolean result = false; // 引数:システム管理No try { stKanriNo = Request.QueryString.Get(Const.Def.DefPARA_KANRINO).Trim(); if (stKanriNo == "" || stKanriNo == null) { bRet = true; } } catch (Exception) { bRet = true; } if (bRet == true) { DetailDiv.Visible = false; arrayMessage.Add(Const.Def.DefMsg_URLERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { DetailDiv.Visible = false; arrayMessage.Add(Const.Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // 検索ログ登録 //20170201 機能改善 START //result = bcom.RegistLogData(Const.Def.DefTYPE_DETAIL, "", int.Parse(stKanriNo)); result = bcom.RegistLogData(Const.Def.DefTYPE_DETAIL, "", int.Parse(stKanriNo), DateTime.Now); //20170201 機能改善 END // 過去トラデータ取得 dtTrableData = bcom.GetTroubleData(stKanriNo); if (dtTrableData.Rows.Count == 0) { DetailDiv.Visible = false; arrayMessage.Add(Const.Def.DefMsg_DATA_NOTFOUND); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // 画面表示処理 initialDisp(dtTrableData, bcom.GetLinkForder()); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmDetail", "Page_Load", ex, this.Response); } }
// フォロー回答登録処理 protected void btnRegist_Click(object sender, EventArgs e) { CommonLogic bcom = new CommonLogic(); try { Boolean result = false; String strSindo; // 2016.04.20 Kanda 適用有無設計の更新を廃止 // String strHyouka = "*"; DataTable dtFollowData = null; BuisinessLogic.BLAnswer bAnswer = new BuisinessLogic.BLAnswer(); dtFollowData = bAnswer.GetFollowData(ViewState["FMC_mc"].ToString(), ViewState["KAIHATU_ID"].ToString(), ViewState["BY_PU"].ToString(), ViewState["EVENT_NO"].ToString(), ViewState["FOLLOW_NO"].ToString(), ViewState["KA_CODE"].ToString(), ViewState["SYSTEM_NO"].ToString()); if (dtFollowData.Rows.Count == 0) { errorMessage(Const.Def.DefMsg_KAITO_NOTFOUND); return; } // 更新日時の排他チェック if (ViewState["SHARED_YMD"].ToString() != dtFollowData.Rows[0]["SHARED_YMD"].ToString()) { errorMessage(Const.Def.DefMsg_KAITO_EDITED); return; } if (rdoSindo1.Checked == true) { strSindo = "済"; } else if (rdoSindo2.Checked == true) { strSindo = "△"; } else if (rdoSindo3.Checked == true) { strSindo = "×"; } else { strSindo = "-"; // 2016.04.20 Kanda 適用有無設計の更新を廃止 // strHyouka = " "; } // フォローデータ更新 // 2016.04.20 Kanda 適用有無設計の更新を廃止 // result = bAnswer.registFollowData(ViewState["FMC_mc"].ToString(), // ViewState["KAIHATU_ID"].ToString(), // ViewState["BY_PU"].ToString(), ViewState["EVENT_NO"].ToString(), // ViewState["FOLLOW_NO"].ToString(), ViewState["KA_CODE"].ToString(), // ViewState["SYSTEM_NO"].ToString(), strHyouka, strSindo, // txtAnswer.Text.Trim(), bcom.GetWindowsUser() // ); result = bAnswer.registFollowData(ViewState["FMC_mc"].ToString(), ViewState["KAIHATU_ID"].ToString(), ViewState["BY_PU"].ToString(), ViewState["EVENT_NO"].ToString(), ViewState["FOLLOW_NO"].ToString(), ViewState["KA_CODE"].ToString(), ViewState["SYSTEM_NO"].ToString(), strSindo, txtAnswer.Text.Trim(), bcom.GetWindowsUser() ); // 画面終了 endDisp("1"); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmAnswer", "btnRegist_Click", ex, this.Response); } }
/// <summary> /// 初期表示 /// </summary> protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } pnlCategoryBusyo.Visible = false; ViewState["MailAddr"] = ""; ViewState["HELP"] = ""; ViewState["QA"] = ""; txtSearch.Focus(); try { Boolean bRet = false; // 画面表示処理 initialDisp(); // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { lnkTop.Enabled = false; btnSearch.Enabled = false; lnkTop01.Enabled = false; lnkTop02.Enabled = false; lnkTop03.Enabled = false; lnkTop04.Enabled = false; lnkTop05.Enabled = false; lnkTop06.Enabled = false; lnkTop07.Enabled = false; lnkTop08.Enabled = false; lnkTop09.Enabled = false; lnkTop10.Enabled = false; //btnFollow.Enabled = false; 2017.03.29 神田 画面から削除 ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); arrayMessage.Add(Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); } else { // 2017.04.04 ta_Kanda マニュアルとQAを分離 Start String helpForder = bcom.GetHelpForder("SH"); String helpUrl = "file:"; if (helpForder.Trim() != "") { if (bcom.CheckFile(helpForder.Trim()) == 0) { helpUrl += helpForder.Trim().Replace("\\", "/"); ViewState["HELP"] = helpUrl; } } String qaForder = bcom.GetHelpForder("SQ"); String qaUrl = "file:"; if (qaForder.Trim() != "") { if (bcom.CheckFile(qaForder.Trim()) == 0) { qaUrl += qaForder.Trim().Replace("\\", "/"); ViewState["QA"] = qaUrl; } } // 2017.04.04 ta_Kanda マニュアルとQAを分離 End DataTable work_t = bcom.GetUser(); if (work_t.Rows.Count > 0) { ViewState["MailAddr"] = bcom.GetMailAddress(work_t.Rows[0]["BY_PU"].ToString()); } } //String BYPU = "BY"; CategoryProc("31", "BY"); // BY部署・設計 CategoryProc("32", "BY"); // BY部署・評価 CategoryProc("31", "PU"); // PU部署・設計 CategoryProc("32", "PU"); // PU部署・評価 CategoryProc(Def.DefTYPE_PARTS, ""); // 部品 ckBoxBuhin.DataSource = ""; ckBoxBuhin.DataBind(); CategoryProc(Def.DefTYPE_KAIHATU, ""); // 開発符号 CategoryProc(Def.DefTYPE_GENSYO, ""); // 現象(分類) CategoryProc(Def.DefTYPE_GENIN, ""); // 原因(分類) CategoryProc(Def.DefTYPE_SYAKATA, ""); // 車型特殊 CategoryProc(Def.DefTYPE_SGENSYO, ""); // 現象(制御系) CategoryProc(Def.DefTYPE_SYOUIN, ""); // 要因(制御系) CategoryProc(Def.DefTYPE_EGTM, ""); // EGTM形式 //CategoryProc(Def.DefTYPE_TOP40, ""); // TOP40 //CategoryProc(Def.DefTYPE_RIPRO20, ""); // リプロ20 ViewState[Def.DefPARA_CONDITION_FLG] = Def.DefTYPE_OR; //検索履歴画面表示処理 SearchHistory(); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmSearch", "Page_Load", ex, this.Response); } }
protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } ViewState["HELP"] = ""; ViewState["QA"] = ""; CommonLogic bcom = new CommonLogic(); try { BuisinessLogic.BLSearch bLogic = new BuisinessLogic.BLSearch(); Boolean bRet = false; // 画面表示処理 initialDisp(); // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { lnkTop.Enabled = false; btn_Kaito.Enabled = false; btn_Download.Enabled = false; ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); arrayMessage.Add(Const.Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); } else { // 2017.04.04 ta_kanda マニュアルとQAを分離 Start String helpForder = bcom.GetHelpForder("FH"); String helpUrl = "file:"; if (helpForder.Trim() != "") { if (bcom.CheckFile(helpForder.Trim()) == 0) { helpUrl += helpForder.Trim().Replace("\\", "/"); ViewState["HELP"] = helpUrl; } } String qaForder = bcom.GetHelpForder("FQ"); String qaUrl = "file:"; if (qaForder.Trim() != "") { if (bcom.CheckFile(qaForder.Trim()) == 0) { qaUrl += qaForder.Trim().Replace("\\", "/"); ViewState["QA"] = qaUrl; } } // 2017.04.04 ta_kanda マニュアルとQAを分離 End DataTable work_t = bcom.GetUser(); if (work_t.Rows.Count > 0) { ViewState["MailAddr"] = bcom.GetMailAddress(work_t.Rows[0]["BY_PU"].ToString()); } } } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmFollow", "Page_Load", ex, this.Response); } }
/// <summary> /// ページ読み込み処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } try { Boolean bRet = false; string strManageNo = ""; // 管理番号 string strAnswerSystemNo = ""; // 回答対象システムNo string strAnswerDepartmentCode = ""; // 回答対象部署コード ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); // 観たか管理番号、回答対象システムNo、回答対象部署コード try { strManageNo = Request.QueryString.Get("ManageNo").Trim(); strAnswerSystemNo = Request.QueryString.Get("SystemNo").Trim(); strAnswerDepartmentCode = Request.QueryString.Get("DepartmentCode").Trim(); if (strManageNo == "" || strManageNo == null) { bRet = true; } if (strAnswerSystemNo == "" || strAnswerSystemNo == null) { bRet = true; } if (strAnswerDepartmentCode == "" || strAnswerDepartmentCode == null) { bRet = true; } } catch (Exception) { bRet = true; } if (bRet == true) { //DetailDiv.Visible = false; // 画面詳細項目を表示しない arrayMessage.Add(Def.DefMsg_URLERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { //DetailDiv.Visible = false; // 画面詳細項目を表示しない arrayMessage.Add(Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); return; } // 過去トラ観たか回答情報 コンストラクタ // 過去トラ観たか回答、過去トラ情報のデータ取得 _MitakaAnswerData = new MitakaAnswerData(strManageNo, strAnswerSystemNo, strAnswerDepartmentCode); // ユーザID取得 string sUser = bcom.GetWindowsUser(); // 過去トラ観たか情報 コンストラクタ // 過去トラ観たかヘッダーのデータ取得 _MitakaData = new MitakaData(strManageNo, sUser, "HeadOnly"); // 画面表示処理 initialDisp(); } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmDetail", "Page_Load", ex, this.Response); } }
/// <summary> /// Web.Configより掲示板テキストフォルダパスを取得 /// </summary> protected void readTxt(string sight) { CommonLogic bcom = new CommonLogic(); try { String infoFilePath, txtSight, disSight = "", disFlg = "", text = ""; if (sight.Equals("common")) { txtSight = "txtFileCommon"; disSight = "commonDisplayflg"; } else if (sight.Equals("topicTokyo")) { txtSight = "txtFileTopicTokyo"; disSight = "topicTokyoDisplayflg"; } else if (sight.Equals("topicGunma")) { txtSight = "txtFileTopicGunma"; disSight = "topicGunmaDisplayflg"; } else { txtSight = "txtSample"; } if (disSight != "") { disFlg = System.Web.Configuration.WebConfigurationManager.AppSettings[disSight]; } int newCount = int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["bbNewDayCount"]); if ((disFlg == "1") || (sight.Equals("sample"))) { infoFilePath = System.Web.Configuration.WebConfigurationManager.AppSettings[txtSight]; string txtInfo = HttpContext.Current.Server.MapPath(infoFilePath); //string text = System.IO.File.ReadAllText(@txtInfoGunma); System.IO.StreamReader sr = new System.IO.StreamReader(@txtInfo, System.Text.Encoding.GetEncoding("shift_jis")); //内容をすべて読み込む text = sr.ReadToEnd(); //txtファイルを解放する sr.Close(); sr.Dispose(); } else { text = "編集不可"; } if (sight.Equals("common")) { txtCommon.Text = text; if (disFlg != "1") { txtCommon.ReadOnly = true; btnCommon.Visible = false; disFlgCommon = true; } } else if (sight.Equals("topicTokyo")) { titleTopics.InnerText = titleTopics.InnerText + "(東京)"; txtTopicTokyo.Text = text; if (disFlg != "1") { txtTopicTokyo.ReadOnly = true; btnTopicTokyo.Visible = false; disFlgTopicTokyo = true; } } else if (sight.Equals("topicGunma")) { titleTopics.InnerText = titleTopics.InnerText + "(群馬)"; txtTopicGunma.Text = text; if (disFlg != "1") { txtTopicGunma.ReadOnly = true; btnTopicGunma.Visible = false; disFlgTopicGunma = true; } } string html = ""; string strRows; string[] strMoji; String[] textList = new String[] { "", "", "" }; DateTime nowTime = DateTime.Now; DateTime writeDate; TimeSpan diff; int rowMaxLength = 2; if ((disFlg == "1") || (sight.Equals("sample"))) { text = text.Trim().ToString().Replace(Environment.NewLine, "\n"); textList = text.Trim().Split('\n'); } html = html + "<div class='divTable divTabletable-responsive' style='width: 100%;height:100%;'>"; if (sight.Equals("common")) { html = html + "<table id='tableCommon' "; } else if (sight.Equals("topicTokyo")) { html = html + "<table id='tableTopic' "; } else if (sight.Equals("topicGunma")) { html = html + "<table id='tableTopic' "; } else { html = html + "<table id='tableSample' "; } if (!sight.Equals("sample")) { if (disFlg == "1") { html = html + "style='padding:0%;width:100%' class='table table-condensed display compact nowrap'>"; html = html + "<thead style='display:none;'>"; html = html + "<tr><th style='width: 20px;'></th><th style='width: 60px;'>掲載日時</th><th>掲載内容</th></tr>"; } else { html = html + "style='padding:0%;width:100%' class='table table-condensed display compact nowrap'>"; html = html + "<thead style='display:none;'>"; html = html + "<tr><th></th></tr>"; } } else { html = html + "style='padding:0%;width:100%' class='table table-condensed display compact nowrap cell-border'>"; html = html + "<thead style='display:none;'>"; html = html + "<tr><th>掲載日時</th><th>掲載内容</th></tr>"; } html = html + "</thead>"; html = html + "<tbody>"; if ((disFlg != "1") && (!sight.Equals("sample"))) { html = html + "<tr><th>" + System.Web.Configuration.WebConfigurationManager.AppSettings["nonDispMessage"] + "</th></tr>"; } else if (textList.Length > 0) { for (int i = 0; i < textList.Length; i++) { int changeSort = textList.Length - i - 1; if ((textList[changeSort].Trim().ToString() != "") && (textList[changeSort].Trim().ToString().Substring(0, 4) != "<%--")) { html = html + "<tr>"; strRows = textList[changeSort].Trim().ToString(); strMoji = strRows.Split(','); for (int j = 0; j < rowMaxLength; j++) { if ((j == 0) && (!sight.Equals("sample"))) { string weekName = ""; try { // 2017/02/19 t.kanda 掲示板から日時を削除 writeDate = DateTime.ParseExact(strMoji[j].Trim().ToString(), "yyyy/MM/dd", null); //writeDate = DateTime.ParseExact(strMoji[j].Trim().ToString(), "yyyy/MM/dd HH:mm", null); weekName = GetWeek(writeDate); diff = nowTime - writeDate; if (diff.Days < newCount) { html = html + "<th style='width: 20px;'>" + "<img SRC='/Images/new.gif' border='0' WIDTH='20' HEIGHT='10'></th>"; // 2017/02/19 t.kanda 掲示板から日時を削除 html = html + "<th with style='width: 70px;text-align:left; color: blue;'>" + strMoji[j].Trim().ToString() + weekName + "</th>"; } else { html = html + "<th style='width: 20px;'></th>"; // 2017/02/19 t.kanda 掲示板から日時を削除 html = html + "<th with style='width: 70px;text-align:left; '>" + strMoji[j].Trim().ToString() + weekName + "</th>"; } } catch { html = html + "<th style='width: 20px;'></th>"; } // 2017/02/19 t.kanda 掲示板から日時を削除 //html = html + "<th with style='width: 70px;text-align:left; color: blue;'>" + strMoji[j].Trim().ToString() + weekName + "</th>"; } else { html = html + "<th style='text-align:left;'>" + strMoji[j].Trim().ToString() + "</th>"; } } html = html + "</tr>"; } } } html = html + "</tbody>"; html = html + "</table>"; html = html + "</div>"; if (sight.Equals("common")) { infoCommon.InnerHtml = html; } else if (sight.Equals("topicTokyo")) { infoTopic.InnerHtml = html; } else if (sight.Equals("topicGunma")) { infoTopic.InnerHtml = html; } else { sampleDiv.InnerHtml = html; } } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "readTxt", ex, this.Response); } }
/// <summary> /// 初期表示 /// </summary> protected void Page_Load(object sender, EventArgs e) { // ポストバック時はリターン if (IsPostBack == true) { return; } ViewState["HELP"] = ""; ViewState["QA"] = ""; CommonLogic bcom = new CommonLogic(); try { Boolean bRet = false; // Windowsログイン・ユーザマスタチェック bRet = bcom.CheckUser(); if (bRet) { btn_Search.Enabled = false; btn_Follow.Enabled = false; //btn_ChangeImage.Enabled= false; //btnShow.Style["visibility"] = "hidden"; ClientScriptManager csManager = Page.ClientScript; Type csType = this.GetType(); ArrayList arrayMessage = new ArrayList(); arrayMessage.Add(Const.Def.DefMsg_USERERR); bcom.ShowMessage(csType, csManager, arrayMessage); } else { btn_Search.Enabled = true; btn_Follow.Enabled = true; //btn_ChangeImage.Enabled = true; // 2017.04.03 ta_kanda 追加 Start String helpForder = bcom.GetHelpForder("TH"); String helpUrl = "file:"; if (helpForder.Trim() != "") { //if (bcom.CheckFolder(helpForder.Trim()) == 0) if (bcom.CheckFile(helpForder.Trim()) == 0) { helpUrl += helpForder.Trim().Replace("\\", "/"); ViewState["HELP"] = helpUrl; } } String qaForder = bcom.GetHelpForder("TQ"); String qaUrl = "file:"; if (qaForder.Trim() != "") { if (bcom.CheckFile(qaForder.Trim()) == 0) { qaUrl += qaForder.Trim().Replace("\\", "/"); ViewState["QA"] = qaUrl; } } // 2017.04.03 ta_kanda 追加 End } // 掲示板テキストの取得 readTxt("common"); readTxt("sample"); //ユーザーのサイト情報取得 DataTable userInfo = bcom.GetUser(); hdnPageUrl.Value = Request.Url.AbsoluteUri; if (userInfo.Rows.Count > 0) { string userSight = userInfo.Rows[0]["BY_PU"].ToString(); hdnUserInfo.Value = userSight; if (userSight == "BY") { // 掲示板テキストの取得 readTxt("topicGunma"); } else { // 掲示板テキストの取得 readTxt("topicTokyo"); hdnTabIndex.Value = "1"; } string sqbFg = userInfo.Rows[0]["SQB_FLG"].ToString(); if (sqbFg == "1") { hdnSqbFg.Value = "1"; } } } // システムエラー処理(ログ出力、エラー画面遷移) catch (Exception ex) { // システムエラー処理(ログ出力&エラーページ表示) bcom.ErrorProcess("frmTopPage", "Page_Load", ex, this.Response); } }