コード例 #1
0
        public static tb_version_model GetSimpleVersion(int taskid, int version, DbConn conn = null)
        {
            tb_version_dal dal = new tb_version_dal();

            if (conn == null)
            {
                using (DbConn PubConn = DbConfig.CreateConn(Config.TaskConnectString))
                {
                    PubConn.Open();
                    return(dal.GetSimpleVersion(PubConn, taskid, version));
                }
            }
            else
            {
                return(dal.GetSimpleVersion(conn, taskid, version));
            }
        }
コード例 #2
0
        public JsonResult GetVersion(int taskid, int version)

        {
            // http: //10.1.13.28:8046/OpenApi/GetVersion
            return(this.Visit(Core.EnumUserRole.None, () =>
            {
                using (DbConn PubConn = DbConfig.CreateConn(Config.TaskConnectString))
                {
                    PubConn.Open();
                    tb_version_dal dal = new tb_version_dal();
                    tb_version_model model = dal.GetSimpleVersion(PubConn, taskid, version);
                    return Json(model);
                }
            }));
        }