Для входа или публикации мы можем иметь две разные формы. Но для одобрения и отклонения эти вещи должны быть динамически обрабатываться в одной форме или в пользовательском интерфейсе. Скажем, для одобрения, есть пять человек. Таким образом, с их утверждением, документ готов к печати или каким -либо требованием.
Код: Выделить всё
WorkFlowID - ApproverId - StepName - StepOrder - ActionType
< /code>
WorkFlowID
// Define a generics class named Document
public class Document
{
// Define a variable of type T
public T data;
// Define a constructor of the Document class
public Document(T data)
{
this.data = data;
}
}
< /code>
So whatever the process is, that should be able to be rendered in the frontend with the generic type. So for now, we create classes for all of the documents and create different forms each time there's a new process as follows:
public class RecruitmentDoc : Document
{
}
public class LoanDoc : Document
{
}
< /code>
Is this the correct way to handle this kind of scenario? Any POC would be much appreciated in this regard.
NB: in the frontend, we use Razor. So any example or source with Razor would be really of great help.
Подробнее здесь: https://stackoverflow.com/questions/795 ... neric-type