Пример #1
0
        /// <summary>
        /// カテゴリ検索・部品部位絞込み
        /// </summary>
        protected void btn_Filter(Object sender, EventArgs e)
        {
            DataTable dtPartList = null;

            try
            {
                String strBY = "1";
                String strPU = "1";

                BuisinessLogic.BLSearch bLogic = new BuisinessLogic.BLSearch();

                ArrayList arrWork = new ArrayList();

                foreach (ListItem sysItem in ckBoxSystem.Items)
                {
                    if (sysItem.Selected)
                    {
                        arrWork.Add(sysItem.Value);
                    }
                }

                dtPartList = bLogic.GetPartsList(strBY, strPU, arrWork);

                ckBoxBuhin.DataSource = dtPartList;
                ckBoxBuhin.DataBind();
                ckBoxBuhin.Focus();
            }
            // システムエラー処理(ログ出力、エラー画面遷移)
            catch (Exception ex)
            {
                // システムエラー処理(ログ出力&エラーページ表示)
                bcom.ErrorProcess("frmSearch", "btn_Filter", ex, this.Response);
            }
        }
Пример #2
0
        /// <summary>
        /// 過去トラカテゴリ検索表示処理
        /// </summary>
        protected void CategoryProc(String Type, String BYPU)
        {
            //------ TYPE:検索タイプ
            // 1;文字列検索
            // 2:TOP10検索
            // 3:部署
            // 4:部品
            // 5:開発符号
            // 6:現象(分類)
            // 7:原因(分類)
            // 8:車型特殊
            // 9:現象(制御系)
            // 10:要因(制御系)
            // 11:EGTM形式
            // 12:TOP40
            // 13:リプロ20

            switch (Type)
            {
            case "31":
            case "32":
                // 部署
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_BUSYO;
                ViewState[Def.DefPARA_CATNM] = "";
                pnlCategoryBusyo.Visible     = true;
                break;

            case Def.DefTYPE_PARTS:
                // 部品・部位
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_PARTS;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_PARTS;
                //pnlCategoryBuhin.Visible = true;
                break;

            case Def.DefTYPE_KAIHATU:
                // 開発符号def.
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_KAIHATU;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_KAIHATU;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_GENSYO:
                // 現象(分類)
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_GENSYO;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_GENSYO;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_GENIN:
                // 原因(分類)
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_GENIN;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_GENIN;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_SYAKATA:
                // 車型特殊
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_SYAKATA;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_SYAKATA;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_SGENSYO:
                // 現象(制御系)
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_SGENSYO;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_SGENSYO;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_SYOUIN:
                // 要因(制御系)
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_SYOUIN;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_SYOUIN;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_EGTM:
                // EGTM形式
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_EGTM;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_EGTM;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_TOP40:
                // TOP40
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_TOP40;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_TOP40;
                //pnlCategoryMst.Visible = true;
                break;

            case Def.DefTYPE_RIPRO20:
                // リプロ20
                ViewState[Def.DefPARA_TYPE]  = Def.DefTYPE_RIPRO20;
                ViewState[Def.DefPARA_CATNM] = Def.DefTYPENM_RIPRO20;
                //pnlCategoryMst.Visible = true;
                break;
            }

            BuisinessLogic.BLSearch bLogic = new BuisinessLogic.BLSearch();

            DataTable result = null;

            result = bLogic.GetMasterList(Type, BYPU);

            //if (((Type == "31")
            //  && (BYPU == "BY")))
            //{
            //    if (result.Rows.Count != 0)
            //    {
            //        ckBoxBusyoSekkeiPu.DataSource = result;
            //        ckBoxBusyoSekkeiPu.DataBind();
            //    }
            //}

            //if (((Type == "32")
            //  && (BYPU == "BY")))
            //{
            //    if (result.Rows.Count != 0)
            //    {
            //        ckBoxBusyoHyoukaPu.DataSource = result;
            //        ckBoxBusyoHyoukaPu.DataBind();
            //    }
            //}

            switch (Type)
            {
            // 部署設計
            case "31":
                if (result.Rows.Count != 0)
                {
                    if (BYPU == "BY")
                    {
                        ckBoxBusyoSekkeiBy.DataSource = result;
                        ckBoxBusyoSekkeiBy.DataBind();
                    }
                    {
                        ckBoxBusyoSekkeiPu.DataSource = result;
                        ckBoxBusyoSekkeiPu.DataBind();
                    }
                }
                break;

            // 部署評価
            case "32":
                if (result.Rows.Count != 0)
                {
                    if (BYPU == "BY")
                    {
                        ckBoxBusyoHyoukaBy.DataSource = result;
                        ckBoxBusyoHyoukaBy.DataBind();
                    }
                    {
                        ckBoxBusyoHyoukaPu.DataSource = result;
                        ckBoxBusyoHyoukaPu.DataBind();
                    }
                }
                break;

            case Def.DefTYPE_PARTS:
                if (result.Rows.Count != 0)
                {
                    // 部品・部位
                    ckBoxSystem.DataSource = result;
                    ckBoxSystem.DataBind();
                }
                break;

            case Def.DefTYPE_KAIHATU:
                if (result.Rows.Count != 0)
                {
                    // 開発符号def.
                    ckBoxMst01.DataSource = result;
                    ckBoxMst01.DataBind();
                }
                break;

            case Def.DefTYPE_GENSYO:
                if (result.Rows.Count != 0)
                {
                    // 現象(分類)
                    ckBoxMst02.DataSource = result;
                    ckBoxMst02.DataBind();
                }
                break;

            case Def.DefTYPE_GENIN:
                if (result.Rows.Count != 0)
                {
                    // 原因(分類)
                    ckBoxMst03.DataSource = result;
                    ckBoxMst03.DataBind();
                }
                break;

            case Def.DefTYPE_SYAKATA:
                if (result.Rows.Count != 0)
                {
                    // 車型特殊
                    ckBoxMst04.DataSource = result;
                    ckBoxMst04.DataBind();
                }
                break;

            case Def.DefTYPE_SGENSYO:
                if (result.Rows.Count != 0)
                {
                    // 現象(制御系)
                    ckBoxMst05.DataSource = result;
                    ckBoxMst05.DataBind();
                }
                break;

            case Def.DefTYPE_SYOUIN:
                if (result.Rows.Count != 0)
                {
                    // 要因(制御系)
                    ckBoxMst06.DataSource = result;
                    ckBoxMst06.DataBind();
                }
                break;

            case Def.DefTYPE_EGTM:
                if (result.Rows.Count != 0)
                {
                    // EGTM形式
                    ckBoxMst07.DataSource = result;
                    ckBoxMst07.DataBind();
                }
                break;
                //case Def.DefTYPE_TOP40:
                //    if (result.Rows.Count != 0)
                //    {
                //        // TOP40
                //        ckBoxMst08.DataSource = result;
                //        ckBoxMst08.DataBind();
                //    }
                //    break;
                //case Def.DefTYPE_RIPRO20:
                //    // リプロ20
                //    ckBoxMst09.DataSource = result;
                //    ckBoxMst09.DataBind();
                //    break;
            }
        }
Пример #3
0
        /// <summary>
        /// 画面表示処理
        /// </summary>
        protected void initialDisp()
        {
            DateTime dtNow = DateTime.Now;

            lblTop10.Text = dtNow.Year + " 年 " + dtNow.Month + " 月 検索ワードTOP10";
            //lblTop10.Text = dtNow.Year + " 年 " + dtNow.Month + " 月 の検索キーワードTOP10";

            BuisinessLogic.BLSearch bLogic = new BuisinessLogic.BLSearch();

            lnkTop01.Text = "";
            lnkTop02.Text = "";
            lnkTop03.Text = "";
            lnkTop04.Text = "";
            lnkTop05.Text = "";
            lnkTop06.Text = "";
            lnkTop07.Text = "";
            lnkTop08.Text = "";
            lnkTop09.Text = "";
            lnkTop10.Text = "";

            DataTable dtKeyword   = null;
            DataTable dtRecommend = null;

            // AutoComplete のキーワードリスト取得
            dtKeyword = bLogic.GetKeyWordList();

            string jisyoInfo = "";

            for (int i = 0; i < dtKeyword.Rows.Count; i++)
            {
                if (i > 0)
                {
                    jisyoInfo += ",\n";
                }

                jisyoInfo += "{ label: '" + dtKeyword.Rows[i]["WORD_KEY"].ToString().Trim() + " " + dtKeyword.Rows[i]["WORD_CHAR"].ToString().Trim() + "', value: '" + dtKeyword.Rows[i]["WORD_KEY"].ToString().Trim() + "'}";
            }

            ViewState["JisyoInfo"] = jisyoInfo;

            // おすすめTOP10のデータ取得
            dtRecommend = bLogic.GetRecommendList();

            for (int i = 0; i < 10; i++)
            {
                if (dtRecommend.Rows.Count < i + 1)
                {
                    break;
                }
                else
                {
                    var toptenWord = dtRecommend.Rows[i]["RECOMMEND_WORD"].ToString().Trim();

                    switch (i)
                    {
                    case 0:
                        lnkTop01.Text        = toptenWord;
                        lnkTop01.CommandName = toptenWord;
                        break;

                    case 1:
                        lnkTop02.Text        = toptenWord;
                        lnkTop02.CommandName = toptenWord;
                        break;

                    case 2:
                        lnkTop03.Text        = toptenWord;
                        lnkTop03.CommandName = toptenWord;
                        break;

                    case 3:
                        lnkTop04.Text        = toptenWord;
                        lnkTop04.CommandName = toptenWord;
                        break;

                    case 4:
                        lnkTop05.Text        = toptenWord;
                        lnkTop05.CommandName = toptenWord;
                        break;

                    case 5:
                        lnkTop06.Text        = toptenWord;
                        lnkTop06.CommandName = toptenWord;
                        break;

                    case 6:
                        lnkTop07.Text        = toptenWord;
                        lnkTop07.CommandName = toptenWord;
                        break;

                    case 7:
                        lnkTop08.Text        = toptenWord;
                        lnkTop08.CommandName = toptenWord;
                        break;

                    case 8:
                        lnkTop09.Text        = toptenWord;
                        lnkTop09.CommandName = toptenWord;
                        break;

                    case 9:
                        lnkTop10.Text        = toptenWord;
                        lnkTop10.CommandName = toptenWord;
                        break;
                    }
                }
            }
        }
Пример #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);
            }
        }