Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
@inject IConfiguration Configuration;
@{
var canEdit = Convert.ToBoolean(ViewData["CanEdit"]);
var forwadDepartmentDirector = Convert.ToBoolean(ViewData["ForwadDepartmentDirector"]);
var isRegistered = Convert.ToBoolean(ViewData["IsRegistered"]);
var isClsCodeDirectExec = Convert.ToBoolean(ViewData["IsClsCodeDirectExec"]);
var forInfo = Convert.ToBoolean(ViewData["ForInfo"]);
var disabled = !canEdit;
}
<style>
.c-p-l {
padding-left: 40px;
}
</style>
<script>
var agreementUsers = @Html.Raw(Json.Serialize(Model.ExecutorList));
function initializeDocFlowDetail() {
refreshAgreementUsers();
}
function gbAcceptedUserChanged(e) {
dxHelpers.gridLookupChanged("#dtAcceptedUser", e);
}
function gbNotAcceptedHeadsChanged(e) {
dxHelpers.gridLookupMultipleChanged("#dtNotAcceptedHeads", e);
}
function gbSignedUserChanged(e) {
dxHelpers.gridLookupChanged("#dtSignedUser", e);
}
function gbWatchersChanged(e) {
dxHelpers.gridLookupMultipleChanged("#dtWatchers", e);
}
function gbAgreementChanged(e) {
dxHelpers.gridLookupChanged("#dtAgreement", e);
}
function refreshAgreementUsers() {
$("#hdExecutors").val(JSON.stringify(agreementUsers));
}
function addAgreementUser() {
var user = $("#dbAgreement").dxDropDownBox("instance").option("value");
if (user[0]) {
agreementUsers.push({ "UserId": user[0] });
$("#listAgreementUsers").dxList("getDataSource").reload();
$("#dbAgreement").dxDropDownBox("instance").option("value", null);
refreshAgreementUsers();
}
}
function onListAgreementUsersReorder(e) {
agreementUsers.splice(e.fromIndex, 1);
agreementUsers.splice(e.toIndex, 0, e.itemData);
refreshAgreementUsers();
}
function dayCountValueChanged() {
var dayCount = $("#dbDayCount").dxNumberBox('instance').option('value');
$.ajax(`${'@Configuration["CalculationApiUrl"]'}api/Calculation/execute-date`, {
data: {
startDate: dateFormatted(Date.now()),
day: dayCount
},
success: function (response) {
$("#dbDeadline").dxDateBox('instance').option('value', response);
},
error: function (error) {
console.log(error)
}
});
}
function DeadlineValueChanged() {
var deadline = $("#dbDeadline").dxDateBox('instance').option('value');
$.ajax(`${'@Configuration["CalculationApiUrl"]'}api/Calculation/workdays-in-period`, {
data: {
startDate: dateFormatted(Date.now()),
endDate: dateFormatted(deadline)
},
success: function (response) {
$("#dbDayCount").dxNumberBox('instance').option('value', response);
},
error: function (error) {
}
});
}
function dateFormatted(value) {
var date = new Date(value);
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
return month + "." + day + "." + year;
}
function gbDirectorChanged(e) {
dxHelpers.gridLookupChanged("#dtDirector", e);
dtMainExecutorRefresh();
dtExecutorsRefresh();
}
function getDirectorId() {
return $("#dbDirector").dxDropDownBox("instance").option("value");
}
function dtMainExecutorRefresh() {
$("#dtMainExecutor").dxDataGrid("instance").refresh();
}
function dtExecutorsRefresh() {
$("#dtExecutors").dxDataGrid("instance").refresh();
}
function gbMainExecutorChanged(e) {
dxHelpers.gridLookupChanged("#dtMainExecutor", e);
var db = $("#dbExecutors").dxDropDownBox("instance");
if (e.value) {
db.option("disabled", false);
} else {
db.option("disabled", true);
db.option("value", null);
}
}
function gbExecutorsChanged(e) {
dxHelpers.gridLookupMultipleChanged("#dtExecutors", e);
}
function sbDocVisaTextChanged(e) {
var docVisaText = e.value;
if (docVisaText) {
$("#taVisaText1").dxTextArea("instance").option("value", docVisaText);
}
}
function listAgreementUsersDisplayExpr(data) {
var filter = "["Id", "" + data.UserId + ""]";
var data = {};
$.ajax("@Url.Action("GetUsers", "Dictionary", new { Area = "DF" })", {
data: {
filter: filter
},
async: false,
success: function (response) {
data = response.data[0];
},
error: function (error) {
console.error(error);
}
});
return data.EmployeeFullName;
}
function docFlowSuccess() {
//refreshPrintedPage();
}
</script>
<form class="mt-2"
asp-action="SaveDocFlowDetail"
data-ajax="true"
data-ajax-method="POST"
data-ajax-begin="util.setLoader(true);"
data-ajax-success="util.success();docFlowSuccess();"
data-ajax-complete="util.setLoader(false);">
@using (Html.DevExtreme().ValidationGroup())
{
@Html.AntiForgeryToken()
@Html.HiddenFor(m => m.Id)
@Html.HiddenFor(m => m.DocumentId)
@Html.HiddenFor(m => m.ExecutorsJson, new { @id = "hdExecutors" })
@if (!isClsCodeDirectExec)
{
<div class="form-group row">
<label class="col-3 col-form-label text-right">@localizer["Director"]</label>
<div class="col-6">
@(Html.DevExtreme().DropDownBoxFor(m => m.DirectorId)
.ID("dbDirector")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetUsers").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.ShowClearButton(true)
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbDirectorChanged")
.ContentTemplate(new TemplateName("EmbeddedDtDirector"))
.ReadOnly(disabled)
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtDirector"))
{
await Html.RenderPartialAsync("_UserViewEmbebbedDtGridPartial", "dtDirector");
}
</div>
</div>
<div class="form-group row">
@Html.LabelFor(m => m.SignedUserId, new { @class = "col-3 col-form-label text-right" })
<div class="col-6">
@(Html.DevExtreme().DropDownBoxFor(m => m.SignedUserId)
.ID("dbSignedUser")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetUsers").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.ShowClearButton(true)
.OnValueChanged("gbSignedUserChanged")
.ContentTemplate(new TemplateName("EmbeddedDtSignedUser"))
.ReadOnly(disabled)
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtSignedUser"))
{
await Html.RenderPartialAsync("_UserViewEmbebbedDtGridPartial", "dtSignedUser");
}
</div>
</div>
@if (!forwadDepartmentDirector && !forInfo)
{
<div class="form-group row">
@Html.LabelFor(m => m.NotAcceptedHeads, new { @class = "col-3 col-form-label text-right" })
<div class="col-6">
@(Html.DevExtreme().DropDownBoxFor(m => m.NotAcceptedHeads)
.ID("dbNotAcceptedHead")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetHeadUsers").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbNotAcceptedHeadsChanged")
.ContentTemplate(new TemplateName("EmbeddedDtNotAcceptedHeads"))
.ReadOnly(disabled)
//.Disabled(Model.MainExecutorId == null)
.OnOpened(@<text>
function(){
$("#dtNotAcceptedHeads").dxDataGrid("instance").refresh();
}
</text>)
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtNotAcceptedHeads"))
{
await Html.RenderPartialAsync("_UserViewMultipleEmbebbedDtGridPartial", "dtNotAcceptedHeads");
}
</div>
</div>
}
}
@if (!forInfo)
{
<div class="form-group row">
@Html.LabelFor(m => m.DayCount, new { @class = "col-3 col-form-label text-right" })
<div class="col-3">
@(Html.DevExtreme().NumberBoxFor(m => m.DayCount).ID("dbDayCount").OnChange("dayCountValueChanged").ShowClearButton(true).Width("100%").Min(1).ReadOnly(disabled))
</div>
</div>
<div class="form-group row">
@Html.LabelFor(m => m.Deadline, new { @class = "col-3 col-form-label text-right" })
<div class="col-3">
@(Html.DevExtreme().DateBoxFor(m => m.Deadline).ID("dbDeadline").OnClosed("DeadlineValueChanged").ShowClearButton(true).Width("100%").Min(DateTime.Now))
</div>
</div>
<div class="form-group row">
@Html.LabelFor(m => m.MainExecutorId, new { @class = "col-3 col-form-label text-right" })
<div class="col-6">
@(Html.DevExtreme().DropDownBoxFor(m => m.MainExecutorId)
.ID("dbMainExecutor")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetExecutors").LoadParams(new { directorId = new JS("getDirectorId") }).Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbMainExecutorChanged")
.ContentTemplate(new TemplateName("EmbeddedDtMainExecutor"))
.ShowClearButton(true)
.ReadOnly(disabled)
//.OnOpened("dtMainExecutorRefresh")
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtMainExecutor"))
{
await Html.RenderPartialAsync("_UserViewEmbebbedDtGridPartial", "dtMainExecutor");
}
</div>
</div>
<div class="form-group row">
@Html.LabelFor(m => m.RefDocVisaTextId, new { @class = "col-3 col-form-label text-right" })
<div class="col-6">
@(Html.DevExtreme().SelectBoxFor(m => m.RefDocVisaTextId)
.ID("sbDocVisaText")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetRefDocVisaTexts").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("Name")
.ValueExpr("Name")
.Placeholder(localizer["Choose"])
.SearchEnabled(true)
.OnValueChanged("sbDocVisaTextChanged")
.ReadOnly(disabled)
)
</div>
</div>
<div class="form-group row">
@Html.LabelFor(m => m.VisaText, new { @class = "col-3 col-form-label text-right" })
<div class="col-9">
@(Html.DevExtreme().TextAreaFor(m => m.VisaText).ID("taVisaText1").ReadOnly(disabled))
</div>
</div>
<fieldset class="pt-3 pb-2">
<legend>@localizer["Executors"]</legend>
<div class="form-group row">
@Html.LabelFor(m => m.ExecutorList, new { @class = "col-3 col-form-label text-right" })
<div class="col-9">
@(Html.DevExtreme().DropDownBoxFor(m => m.ExecutorList)
.ID("dbExecutors")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetExecutors").LoadParams(new { directorId = new JS("getDirectorId") }).Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbExecutorsChanged")
.ContentTemplate(new TemplateName("EmbeddedDtExecutors"))
.ReadOnly(disabled)
.Disabled(Model.MainExecutorId == null)
//.OnOpened("dtExecutorsRefresh")
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtExecutors"))
{
await Html.RenderPartialAsync("_UserViewMultipleEmbebbedDtGridPartial", "dtExecutors");
}
</div>
</div>
</fieldset>
}
<fieldset class="pt-3 pb-2">
<legend>@localizer["Watchers"]</legend>
<div class="form-group row align-items-center">
@Html.LabelFor(m => m.WatcherList, new { @class = "col-3 col-form-label text-right" })
<div class="col-6">
@(Html.DevExtreme().DropDownBoxFor(m => m.WatcherList)
.ID("dbWatchers1")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetUsers").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbWatchersChanged")
.ContentTemplate(new TemplateName("EmbeddedDtWatchers"))
.ReadOnly(disabled)
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtWatchers"))
{
await Html.RenderPartialAsync("_UserViewMultipleEmbebbedDtGridPartial", "dtWatchers");
}
</div>
</div>
</fieldset>
@*<fieldset class="pt-3 pb-2">
<legend>@localizer["Agreement"]</legend>
<div class="row">
<div class="col-9">
@if (canEdit)
{
<div class="form-row align-items-center mb-2">
<div class="col-9">
@(Html.DevExtreme().DropDownBox()
.ID("dbAgreement")
.DataSource(d => d.Mvc().Area("DF").Controller("Dictionary").LoadAction("GetUsers").Key("Id"))
.DataSourceOptions(d => d.Paginate(true).PageSize(10))
.DisplayExpr("EmployeeFullName")
.ValueExpr("Id")
.Placeholder(localizer["SelectUser"])
.DropDownOptions(options => options.ResizeEnabled(true).Height(350))
.OnValueChanged("gbAgreementChanged")
.ContentTemplate(new TemplateName("EmbeddedDtAgreement"))
.ReadOnly(disabled)
)
@using (Html.DevExtreme().NamedTemplate("EmbeddedDtAgreement"))
{
await Html.RenderPartialAsync("_UserViewEmbebbedDtGridPartial", "dtAgreement");
}
</div>
<div class="col-auto">
@(Html.DevExtreme().Button()
.ID("btnAddExecutor")
.Icon("add")
.Type(ButtonType.Default)
.OnClick("addAgreementUser")
.Disabled(disabled))
</div>
</div>
}
@(Html.DevExtreme().List()
.ID("listAgreementUsers")
.DataSource(new JS("agreementUsers"))
.DisplayExpr(new JS("listAgreementUsersDisplayExpr"))
.KeyExpr("UserId")
.Height("250px")
.AllowItemReordering(canEdit)
.AllowItemDeleting(canEdit)
.OnItemDeleted("refreshAgreementUsers")
.OnItemReordered("onListAgreementUsersReorder")
)
</div>
<div class="col-3 border-left">
@(Html.DevExtreme().RadioGroupFor(m => m.OrderTypeFlag)
.ID("rgOrderType")
.DataSource(Html.GetEnumSelectList<DocFlowOrderTypes>().Select(i => new { Value = short.Parse(i.Value), Text = localizer[i.Text].Value }))
.DisplayExpr("Text")
.ValueExpr("Value")
.Layout(Orientation.Vertical)
.ReadOnly(disabled)
)
</div>
</div>
</fieldset>*@
@if (canEdit)
{
<hr />
<div class="row col mb-2 c-p-l justify-content-end px-0 mx-0">
@(Html.DevExtreme().Button()
.ID("btnDFSave")
.Text(localizer["Save"])
.Type(ButtonType.Default)
.UseSubmitBehavior(true))
<div class="loader-div"></div>
</div>
}
}
</form>
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team