示例#1
0
        public ActionResult GetFormJsonDetail(string keyValue)
        {
            var data = userApp.GetForm(keyValue);

            if (data.F_Gender != null)
            {
                string sql = "select * from Sys_ItemsDetail,Sys_Items where Sys_Items.F_Id = Sys_ItemsDetail.F_ItemId and Sys_Items.F_EnCode ='sex' and Sys_ItemsDetail.F_ItemCode = '" + data.F_Gender + "'";
                List <ItemsDetailEntity> ItemsDetailEntityList = itemsDetailApp.FildSql(sql);
                if (ItemsDetailEntityList != null && ItemsDetailEntityList.Count > 0)
                {
                    data.F_Gender = ItemsDetailEntityList[0].F_ItemName;
                }
            }

            if (data.F_IsAdministrator != null)
            {
                string sql = "select * from Sys_ItemsDetail,Sys_Items where Sys_Items.F_Id = Sys_ItemsDetail.F_ItemId and Sys_Items.F_EnCode ='userType' and Sys_ItemsDetail.F_ItemCode = '" + data.F_IsAdministrator + "'";
                List <ItemsDetailEntity> ItemsDetailEntityList = itemsDetailApp.FildSql(sql);
                if (ItemsDetailEntityList != null && ItemsDetailEntityList.Count > 0)
                {
                    data.F_IsAdministrator = ItemsDetailEntityList[0].F_ItemName;
                }
            }

            if (data.F_OrganizeId != null)
            {
                var data1 = organizeApp.GetForm(data.F_OrganizeId);

                if (data1 != null)
                {
                    data.F_OrganizeId = data1.F_FullName;
                }
            }

            if (data.F_RoleId != null)
            {
                var data2 = roleApp.GetForm(data.F_RoleId);
                if (data2 != null)
                {
                    data.F_RoleId = data2.F_FullName;
                }
            }

            if (data.F_DutyId != null)
            {
                var data3 = roleApp.GetForm(data.F_DutyId);
                if (data3 != null)
                {
                    data.F_DutyId = data3.F_FullName;
                }
            }

            //if (data.F_LastModifyUserId != null)
            //{
            //    var data1 = userApp.GetForm(data.F_LastModifyUserId);
            //    data.F_LastModifyUserId = data1.F_RealName;
            //}
            //if (data.F_CreatorUserId != null)
            //{
            //    var data2 = userApp.GetForm(data.F_CreatorUserId);
            //    data.F_CreatorUserId = data2.F_RealName;
            //}
            return(Content(data.ToJson()));
        }