示例#1
0
 public MstIndexTypeModels GetIndexType(string indexTypeCode)
 {
     MstIndexTypeModels model = new MstIndexTypeModels();
     Hashtable result = mapper.QueryForObject<Hashtable>("Master.getIndexType", indexTypeCode);
     if (result == null)
     {
         return null;
     }
     else
     {
         model.indexTypeCode = indexTypeCode;
         model.indexTypeName = result["index_type_name"].ToString();
         model.typeTimeFormat = result["type_time_format"].ToString();
         model.displayTimeFormat = result["display_time_format"].ToString();
         model.precisionField = Int32.Parse(result["precision_field"].ToString());
         return model;
     }
 }
示例#2
0
        public ActionResult SearchMaster(MstIndexSearchModels model)
        {
            MstIndexTypeDAO indexTypeDAO = new MstIndexTypeDAO(this.mapper);
            model.indexTypeList = indexTypeDAO.GetIndexTypeList(null, Constants.Status.Active);
            MstIndexTypeModels allType = new MstIndexTypeModels();
            model.indexTypeList.Insert(0, allType);

            //if (model.isPublic)
            //{
            //    model.securityType = Constants.Type.Public;
            //}
            //else
            //{
            //    model.securityType = Constants.Type.Authority;
            //}

            if (model.isActive)
            {
                model.indexStatus = Constants.Status.Active;
            }
            else
            {
                model.indexStatus = Constants.Status.Inactive;
            }
            MstIndexDAO indexDAO = new MstIndexDAO(this.mapper);
            model = indexDAO.searchIndex(model, Constants.Term.ShortTerm);
            return View("IndexMaster", model);
        }
示例#3
0
 public ActionResult IndexManagement(IndexManagementModels model)
 {
     MstIndexTypeDAO indexTypeDAO = new MstIndexTypeDAO(this.mapper);
     model.indexTypeList = indexTypeDAO.GetIndexTypeList(null, Constants.Status.Active);
     MstIndexTypeModels allType = new MstIndexTypeModels();
     model.indexTypeList.Insert(0, allType);
     IdxIndexDAO indexDAO = new IdxIndexDAO(this.mapper);
     indexDAO.DeleteIndex(model.indexTypeCode, model.indexCode, model.fromTime, model.toTime, model.term);
     model.infoMessage = PsMModel.Resource.MsgSuccess;
     return View(model);
 }
示例#4
0
        public ActionResult IndexMaster()
        {
            MstIndexSearchModels model = new MstIndexSearchModels();
            MstIndexDAO indexDAO = new MstIndexDAO(this.mapper);
            model.pageIndex = 1;
            model.securityType = Constants.Type.Public;
            model.securityType = Constants.Status.Active;
            model.isPublic = true;
            model.isActive = true;
            //model = indexDAO.searchIndex(model);

            MstIndexTypeDAO indexTypeDAO = new MstIndexTypeDAO(this.mapper);
            model.indexTypeList = indexTypeDAO.GetIndexTypeList(null, Constants.Status.Active);
            MstIndexTypeModels allType = new MstIndexTypeModels();
            model.indexTypeList.Insert(0, allType);
            return View(model);
        }
示例#5
0
 public ActionResult IndexManagement()
 {
     IndexManagementModels model = new IndexManagementModels();
     MstIndexTypeDAO indexTypeDAO = new MstIndexTypeDAO(this.mapper);
     model.indexTypeList = indexTypeDAO.GetIndexTypeList(null, Constants.Status.Active);
     MstIndexTypeModels allType = new MstIndexTypeModels();
     model.indexTypeList.Insert(0, allType);
     return View(model);
 }