本文介绍了如何保存一个半完成的表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个项目,我们想给用户保存他们的一半完成的形式,使他们能够回来以后并完成它的能力。我搞清楚我到底要做到这一点挣扎。我将它们保存在同一个池已完成的应用程序,只能用特殊的地位?我真的不希望通过不得不作出领域可为空的时候,我不希望他们是牺牲完成应用的完整性。

I am working on a project where we would like to give the user the ability to save their half-completed form so they can come back later and complete it. I'm struggling with figuring out exactly how I want to do this. Do I save them in the same pool with the completed applications, only with a special status? I don't really want to sacrifice the integrity of the completed applications by having to make fields be nullable when I don't want them to be.

我应该在不同的模式中创建相同的数据库结构来保存不完整的申请?我能有这等模式是对数据库约束上和可空领域更宽松来解释不完整的申请。

Should I create the same database structure in a different schema to hold the incomplete applications? I could have this other schema be more lax on the database contraints and nullable fields to account for incomplete applications.

有没有更简单的方法来做到这一点?有没有一种方法,我可以只保存视图状态和恢复在以后的时间?

Is there an easier way to do this? Is there a way I can just save the viewstate and restore that at a later time?

感谢您的任何意见!

推荐答案

有可能是一对夫妇的已完成的应用程序和这些半国与国之间的分歧:

There may be a couple of differences between your completed applications and these "half" states:


  1. 正如你所说,大多数验证是不恰当的,字段将是空的,交叉验证probbably无法执行。

  2. 您可能不需要在数据任意搜索功能。

所以我使用不同的数据库,与包括几个关键领域的记录,如用户的ID,日期,那种他们正在填补等和的一个一滴形式田他们已经填补。我是一个Java的家伙,所以我不知道.NET的方式来获得斑点,但在Java中,我可以连载的数据对象支持的形式。

So I'd use a different database, with the record comprising a few key fields such as the User's Id, the date, the kind of form they are filling etc. and a blob of the fields they have filled. I'm a Java guy so I don't know the .NET way to get the blob, but in Java I could serialise the data objects backing the form.

这似乎是在C#中的技术有一定的相似性与Java,至少我是这样理解的正确。

It seems like in C# the techniques have some similarity with Java, at least is I understand this article correctly.

我想如果不存在标准的.NET技术,手工编写一些简单的saveAsAString和readFromStringcode将是一个有点沉闷,但pretty可行的。

I would think that hand-crafting some simple "saveAsAString" and "readFromString" code would be a little dull but pretty doable if no standard .Net techniques exist.

这篇关于如何保存一个半完成的表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 12:14