예제 #1
0
        public ActionResult GetHaveContent()
        {
            var    butype  = Request["data1"];
            string content = SystemMan.getNewHaveExaminContent(butype);

            if (content != "")
            {
                return(Json(new { success = "true", Msg = content }));
            }
            else
            {
                return(Json(new { success = "false", Msg = content }));
            }
        }
예제 #2
0
        public ActionResult InsertExamine()
        {
            var    Butype     = Request["Content"];
            var    allcontent = Request["allcontent"];
            string strErr     = "";

            if (SystemMan.InsertNewExamine(Butype, allcontent, ref strErr) == true)
            {
                return(Json(new { success = "true", Msg = "保存成功" }));
            }
            else
            {
                return(Json(new { success = "false", Msg = "保存出错" + "/" + strErr }));
            }
        }
예제 #3
0
        public ActionResult GetAppType()
        {
            DataTable dt = SystemMan.getNewAppType("AppType");

            if (dt == null || dt.Rows.Count == 0)
            {
                return(Json(new { success = "false", Msg = "无数据" }));
            }
            string id   = "";
            string name = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                id   += dt.Rows[i]["SID"].ToString() + ",";
                name += dt.Rows[i]["Text"].ToString() + ",";
            }
            id   = "" + "," + id.TrimEnd(',');
            name = "--请选择--" + "," + name.TrimEnd(',');
            return(Json(new { success = "true", Strid = id, Strname = name }));
        }
예제 #4
0
        public ActionResult GetUser()
        {
            DataTable dt = SystemMan.GetNewUser();

            if (dt == null || dt.Rows.Count == 0)
            {
                return(Json(new { success = "false", Msg = "无数据" }));
            }
            string id   = "";
            string name = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                id   += dt.Rows[i]["UserId"].ToString() + "/" + dt.Rows[i]["ExJob"].ToString() + ",";
                name += dt.Rows[i]["UserName"].ToString() + ",";
            }
            id   = "" + "," + id.TrimEnd(',');
            name = "--请选择--" + "," + name.TrimEnd(',');
            return(Json(new { success = "true", Strid = id, Strname = name }));
        }
예제 #5
0
        public ActionResult ExamineGrid()
        {
            string where = "";
            string strCurPage;
            string strRowNum;
            string webkey = Request["webkey"].ToString();

            if (Request["curpage"] != null)
            {
                strCurPage = Request["curpage"].ToString();
            }
            if (Request["rownum"] != null)
            {
                strRowNum = Request["rownum"].ToString();
            }
            else
            {
                strRowNum = "10";
            }
            if (webkey != "")
            {
                where += " and a.BuType = '" + webkey + "'";
            }
            UIDataTable udtTask = new UIDataTable();

            if (where != "")
            {
                udtTask = SystemMan.getNewExamineGrid(GFun.SafeToInt32(strRowNum), GFun.SafeToInt32(Request["curpage"]) - 1, where);
            }
            string strjson = GFun.Dt2Json("", udtTask.DtData);

            strjson = strjson.Substring(1);
            strjson = strjson.Substring(0, strjson.Length - 1);
            string jsonData = "{ \"page\":" + GFun.SafeToInt32(Request["curpage"]) + ", \"total\": " + udtTask.IntTotalPages + ", \"records\": " + udtTask.IntRecords + ", \"rows\": ";

            jsonData += strjson + "}";
            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
        public ActionResult UserGrid()
        {
            Acc_Account account = GAccount.GetAccountInfo();

            string where = " and a.DeptId = '" + account.UnitID + "'";
            string where2 = "";
            string strCurPage;
            string strRowNum;
            string UserName = Request["uaskname"].ToString();

            if (Request["curpage"] != null)
            {
                strCurPage = Request["curpage"].ToString();
            }
            if (Request["rownum"] != null)
            {
                strRowNum = Request["rownum"].ToString();
            }
            else
            {
                strRowNum = "10";
            }
            if (UserName != "")
            {
                where2 += " and m.UserName like '%" + UserName + "%'";
            }
            UIDataTable udtTask = SystemMan.getNewUserGrid(GFun.SafeToInt32(strRowNum), GFun.SafeToInt32(Request["curpage"]) - 1, where, where2);
            string      strjson = GFun.Dt2Json("", udtTask.DtData);

            strjson = strjson.Substring(1);
            strjson = strjson.Substring(0, strjson.Length - 1);
            string jsonData = "{ \"page\":" + GFun.SafeToInt32(Request["curpage"]) + ", \"total\": " + udtTask.IntTotalPages + ", \"records\": " + udtTask.IntRecords + ", \"rows\": ";

            jsonData += strjson + "}";
            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }