Пример #1
0
 // 到JobList頁面
 // 傳入 搜尋職缺model,執行 [查看職缺清單] 功能
 // 回傳 職缺清單
 public ActionResult Index(SJM.SearchJobModel searchModel)
 {
     //SJM.SearchJob sjm = new SJM.SearchJob();
     //List<SJM.SearchJobModel> sjModel = new List<SJM.SearchJobModel>();
     //sjModel = sjm.jobList(searchModel);
     ViewBag.SearchJobCol = searchModel;
     return(View("JobListView"));
 }
Пример #2
0
        public ActionResult SendJobListData(SJM.SearchJobModel searchModel)
        {
            SJM.SearchJob             sjm     = new SJM.SearchJob();
            List <SJM.SearchJobModel> sjModel = new List <SJM.SearchJobModel>();

            sjModel = sjm.jobList(searchModel);

            return(Json(this.Json(sjModel), JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public ActionResult SendJobListData(SJM.SearchJobModel searchModel)
        {
            SJM.SearchJob             sjm     = new SJM.SearchJob();
            List <SJM.SearchJobModel> sjModel = new List <SJM.SearchJobModel>();

            sjModel = sjm.jobList(searchModel);

            return(this.Json(sjModel));
        }
Пример #4
0
 // 到JobList頁面
 // 傳入 搜尋職缺model,執行 [查看職缺清單] 功能
 // 回傳 職缺清單
 public ActionResult Index(SJM.SearchJobModel searchModel)
 {
     //SJM.SearchJob sjm = new SJM.SearchJob();
     //List<SJM.SearchJobModel> sjModel = new List<SJM.SearchJobModel>();
     //sjModel = sjm.jobList(searchModel);
     ViewBag.CityName   = searchModel.CityName;
     ViewBag.Wk_Type    = searchModel.Wk_Type;
     ViewBag.CompName   = searchModel.CompName;
     ViewBag.Cjob_Name1 = searchModel.Cjob_Name1;
     return(View("JobListView"));
 }
Пример #5
0
        // 到JobList頁面
        // 傳入 搜尋職缺model,執行 [查看職缺清單] 功能
        // 回傳 職缺清單
        public ActionResult Index(SJM.SearchJobModel searchModel)
        {
            // 搜尋職缺欄位內容種類
            SJM.SearchJob sjm = new SJM.SearchJob();
            ViewBag.DWorkType   = sjm.getWorkType();
            ViewBag.DCityName   = sjm.getCityName();
            ViewBag.DCjob_Name1 = sjm.getCjob_Name1();

            ViewBag.CityName   = searchModel.CityName;
            ViewBag.Wk_Type    = searchModel.Wk_Type;
            ViewBag.CompName   = searchModel.CompName;
            ViewBag.Cjob_Name1 = searchModel.Cjob_Name1;

            ViewBag.SearchJobCol = searchModel;

            return(View("JobListView"));
        }
Пример #6
0
        // 搜尋職缺清單
        public List <SJM.SearchJobModel> jobList(SJM.SearchJobModel sjm)
        {
            #region [做DB連線 以及 執行DB處理]

            // 建立DB連線
            Tools.DBConnection bsc = new Tools.DBConnection();
            #endregion
            // 取出職缺清單
            #region [ 取出職缺清單 ]
            string    SQLComment  = (sjm.CompName == null) ? "" : "AND C.COMPNAME LIKE '%" + sjm.CompName + "%' ";
            string    SQLComment1 = (sjm.Cjob_Name1 == "不拘") ? "" : "AND JT.CJOB_NAME1 = '" + sjm.Cjob_Name1 + "'";
            string    SQLComment2 = (sjm.CityName == "不拘") ? "" : " AND J.CITYNAME = '" + sjm.CityName + "'";
            string    SQLComment3 = (sjm.Wk_Type == "不拘") ? "" : "AND J.WK_TYPE = '" + sjm.Wk_Type + "'";
            DataTable dt          = bsc.ReadDB(
                string.Format(
                    @"SELECT J.COMP_ID,C.COMPNAME,J.CITYNAME,J.JOB_ID,J.OCCU_DESC,J.WK_TYPE,J.CJOB_ID,JT.CJOB_NAME1
                                  FROM [Job] AS J , [JobType] AS JT ,[Company] AS C
                                  WHERE 1=1
                                  AND J.CJOB_ID = JT.CJOB_ID
                                  AND C.COMP_ID = J.COMP_ID
                                  {0} {1} {2} {3}"
                    , SQLComment, SQLComment1, SQLComment2, SQLComment3)
                );
            // 將DataTable的資料轉換為model
            List <SJM.SearchJobModel> joblist = new List <SJM.SearchJobModel>();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                joblist.Add(new SJM.SearchJobModel()
                {
                    Comp_ID    = Convert.ToInt16(dt.Rows[i][0]),
                    CompName   = dt.Rows[i][1].ToString(),
                    CityName   = dt.Rows[i][2].ToString(),
                    Job_ID     = Convert.ToInt16(dt.Rows[i][3]),
                    Occu_Desc  = dt.Rows[i][4].ToString(),
                    Wk_Type    = dt.Rows[i][5].ToString(),
                    Cjob_ID    = Convert.ToInt16(dt.Rows[i][6]),
                    Cjob_Name1 = dt.Rows[i][7].ToString()
                });
            }

            #endregion
            return(joblist);
        }
Пример #7
0
 // 到JobList頁面
 // 傳入 搜尋職缺model,執行 [查看職缺清單] 功能
 // 回傳 職缺清單
 public ActionResult Index(SJM.SearchJobModel searchModel)
 {