Ejemplo n.º 1
0
        //20170318 機能改善 END
        /// <summary>
        /// ユーザー登録用紙ダウンロード
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //
        protected void btn_btnDownloadUser_Click(Object sender, EventArgs e)
        {
            CommonLogic bcom = new CommonLogic();

            string rootfilePath = System.Web.Configuration.WebConfigurationManager.AppSettings["UserEntryFormatPath"];
            string fileName     = System.Web.Configuration.WebConfigurationManager.AppSettings["UserEntryFormat"];
            // ファイル絶対パス設定(拡張子無し)
            //string[] pathList = value.Split(',');
            string filePath     = rootfilePath;
            string fileFullPath = "";
            //string fileExtension = "";
            string dlFileName = HttpUtility.UrlEncode(fileName);

            //ファイル存在チェック

            fileFullPath = filePath + fileName;
            if (bcom.CheckFile(fileFullPath.Trim()) == 0)
            {
                // Response情報クリア
                Response.ClearContent();
                // バファリング
                Response.Buffer = true;
                // HTTPヘッダー情報設定
                Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", dlFileName));
                Response.ContentType = "aapplication/msexcel";
                // ファイル書込(データによりResponse.WriteFile()、Response.Write()、Response.BinaryWrite()を使い分ける
                Response.WriteFile(fileFullPath);
                // フラッシュ
                Response.Flush();
                // レスポンス終了
                Response.End();
            }
        }
Ejemplo n.º 2
0
        /// <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);
            }
        }
Ejemplo n.º 3
0
        /// <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);
            }
        }
Ejemplo n.º 4
0
        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);
            }
        }