Exemplo n.º 1
0
        async public Task <APIReturn> _Edit([FromQuery] string F_Id, [FromForm] DateTime?F_CreatorTime, [FromForm] string F_CreatorUserId, [FromForm] bool F_DeleteMark, [FromForm] DateTime?F_DeleteTime, [FromForm] string F_DeleteUserId, [FromForm] string F_Description, [FromForm] bool F_EnabledMark, [FromForm] string F_EnCode, [FromForm] string F_FullName, [FromForm] DateTime?F_LastModifyTime, [FromForm] string F_LastModifyUserId, [FromForm] int?F_Layers, [FromForm] string F_ParentId, [FromForm] string F_SimpleSpelling, [FromForm] int?F_SortCode)
        {
            Sys_AreaInfo item = await Sys_Area.GetItemAsync(F_Id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            item.F_CreatorTime      = F_CreatorTime;
            item.F_CreatorUserId    = F_CreatorUserId;
            item.F_DeleteMark       = F_DeleteMark;
            item.F_DeleteTime       = F_DeleteTime;
            item.F_DeleteUserId     = F_DeleteUserId;
            item.F_Description      = F_Description;
            item.F_EnabledMark      = F_EnabledMark;
            item.F_EnCode           = F_EnCode;
            item.F_FullName         = F_FullName;
            item.F_LastModifyTime   = F_LastModifyTime;
            item.F_LastModifyUserId = F_LastModifyUserId;
            item.F_Layers           = F_Layers;
            item.F_ParentId         = F_ParentId;
            item.F_SimpleSpelling   = F_SimpleSpelling;
            item.F_SortCode         = F_SortCode;
            int affrows = await Sys_Area.UpdateAsync(item);

            if (affrows > 0)
            {
                return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}"));
            }
            return(APIReturn.失败);
        }
Exemplo n.º 2
0
        async public Task <ActionResult> Edit([FromQuery] string F_Id)
        {
            Sys_AreaInfo item = await Sys_Area.GetItemAsync(F_Id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            ViewBag.item = item;
            return(View());
        }