Beispiel #1
0
        public JsonResult GetAllModule(int type)
        {
            try
            {
                //string sql = "select code_id,description from mmview.frcode where category_id='Department'";
                DB2DataCatcher <FRCodeModel> CodeCatcher = new DB2DataCatcher <FRCodeModel>("MMVIEW.FRCODE")
                {
                    Conditions = "where category_id='Department'"
                };
                switch (type)
                {
                case 0:
                    break;

                case 1:
                    CodeCatcher.Conditions += "and description !='IT'";
                    break;

                case 2:
                    CodeCatcher.Conditions += "and code_id not in ('IT','WD')";
                    break;

                default:
                    //default不处理
                    break;
                }
                var list    = CodeCatcher.GetEntities().EntityList;
                var modules = list.Select(s => new { s.Code_ID, s.Description });
                return(Json(new { success = true, modules }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = false, msg = ex.Message }));
            }
        }
Beispiel #2
0
        public static double GetCount(string title)
        {
            DB2DataCatcher <RPTFuncUsage> CountCatcher = new DB2DataCatcher <RPTFuncUsage>("ISTRPT.RPTFuncUsage")
            {
                Conditions = string.Format("where privilegeid='{0}'", title)
            };
            var    list  = CountCatcher.GetEntities().EntityList;
            double count = list.Any() ? list.First().Usage_Counter : 0;

            return(count);
        }
Beispiel #3
0
        public JsonResult GetEDCTable()
        {
            DB2DataCatcher <Rpt_Non_Lot_Edc_Plan> catcher = new DB2DataCatcher <Rpt_Non_Lot_Edc_Plan>("ISTRPT.Rpt_Non_Lot_Edc_Plan");
            List <Rpt_Non_Lot_Edc_Plan>           list    = new List <Rpt_Non_Lot_Edc_Plan>();

            catcher.GetEntities();
            list = catcher.entities.EntityList.Any() ? catcher.entities.EntityList.ToList() : list;
            var response = list.Select(s => new { EqpID = s.Eqp_ID, EdcPlan = s.Edc_Plan, s.Period, PeriodType = s.Period_Type, id = s.GetHashCode() });

            return(Json(new { success = true, EdcTable = response }));
        }
Beispiel #4
0
        // GET: ReqRpt048
        public ActionResult Index()
        {
            DB2DataCatcher <RPTFuncUsage> CountCatcher = new DB2DataCatcher <RPTFuncUsage>("ISTRPT.RPTFuncUsage")
            {
                Conditions = "where privilegeid='RPT000048'"
            };
            var    list  = CountCatcher.GetEntities().EntityList;
            double count = list.Any() ? list.First().Usage_Counter : 0;

            ViewBag.ClickCount = count;
            return(View());
        }