|
|
@@ -0,0 +1,479 @@
|
|
|
+@using GreenTree.Nachtragsmanagement.Web.Extensions
|
|
|
+
|
|
|
+@{
|
|
|
+ var userContext = GreenTree.Nachtragsmanagement.Core.CommonHelper.UserContext();
|
|
|
+}
|
|
|
+
|
|
|
+@model GreenTree.Nachtragsmanagement.Web.Models.Deviation.DeviationDataModel
|
|
|
+
|
|
|
+<div class="deviationEditContainer">
|
|
|
+
|
|
|
+ <script>
|
|
|
+ var textSeparator = ", ";
|
|
|
+
|
|
|
+ function addStatus() {
|
|
|
+ $.ajax({
|
|
|
+ url: '@Url.Action("EditClaim", "Deviation")',
|
|
|
+ data: { claimType: "status", Id: -1 },
|
|
|
+ success: function (response) {
|
|
|
+ setTimeout(function () {
|
|
|
+ $(".claimEditContainer").remove();
|
|
|
+ $("body").append(response);
|
|
|
+ parent.addCustomEventListener('StatusDataCallbackEventReceiver', function () {
|
|
|
+ StatusId.PerformCallback();
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ alert("error occured");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function addDisturbance() {
|
|
|
+ $.ajax({
|
|
|
+ url: '@Url.Action("EditClaim", "Deviation")',
|
|
|
+ data: { claimType: "disturbance", Id: -1 },
|
|
|
+ success: function (response) {
|
|
|
+ setTimeout(function () {
|
|
|
+ $(".claimEditContainer").remove();
|
|
|
+ $("body").append(response);
|
|
|
+ parent.addCustomEventListener('DisturbanceDataCallbackEventReceiver', function () {
|
|
|
+ DisturbanceId.PerformCallback();
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ alert("error occured");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function addKind() {
|
|
|
+ $.ajax({
|
|
|
+ url: '@Url.Action("EditClaim", "Deviation")',
|
|
|
+ data: { claimType: "kind", Id: -1 },
|
|
|
+ success: function (response) {
|
|
|
+ setTimeout(function () {
|
|
|
+ $(".claimEditContainer").remove();
|
|
|
+ $("body").append(response);
|
|
|
+ parent.addCustomEventListener('KindDataCallbackEventReceiver', function () {
|
|
|
+ KindId.PerformCallback();
|
|
|
+ });
|
|
|
+ }, 200);
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ alert("error occured");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function calculateValue() {
|
|
|
+ Sum.SetValue(Value.GetValue() * (Percentage.GetValue() / 100));
|
|
|
+ }
|
|
|
+
|
|
|
+ function onListBoxSelectionChanged(s, e) {
|
|
|
+ if (e.index == 0)
|
|
|
+ e.isSelected ? s.SelectAll() : s.UnselectAll();
|
|
|
+ updateSelectAllItemState();
|
|
|
+ updateText();
|
|
|
+ }
|
|
|
+ function updateSelectAllItemState() {
|
|
|
+ isAllSelected() ? DisturbanceValues.SelectIndices([0]) : DisturbanceValues.UnselectIndices([0]);
|
|
|
+ }
|
|
|
+ function isAllSelected() {
|
|
|
+ for (var i = 1; i < DisturbanceValues.GetItemCount(); i++)
|
|
|
+ if (!DisturbanceValues.GetItem(i).selected)
|
|
|
+ return false;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ function updateText() {
|
|
|
+ var selectedItems = DisturbanceValues.GetSelectedItems();
|
|
|
+ devDropDownListDisturbanceValues.SetText(getSelectedItemsText(selectedItems));
|
|
|
+ }
|
|
|
+ function synchronizeListBoxValues(s, e) {
|
|
|
+ DisturbanceValues.UnselectAll();
|
|
|
+ var texts = s.GetText().split(textSeparator);
|
|
|
+ var values = getValuesByTexts(texts);
|
|
|
+ DisturbanceValues.SelectValues(values);
|
|
|
+ updateSelectAllItemState();
|
|
|
+ updateText();
|
|
|
+ }
|
|
|
+ function getSelectedItemsText(items) {
|
|
|
+ var texts = [];
|
|
|
+ for (var i = 0; i < items.length; i++)
|
|
|
+ if (items[i].index != 0)
|
|
|
+ texts.push(items[i].text);
|
|
|
+ return texts.join(textSeparator);
|
|
|
+ }
|
|
|
+ function getValuesByTexts(texts) {
|
|
|
+ var actualValues = [];
|
|
|
+ var item;
|
|
|
+ for (var i = 0; i < texts.length; i++) {
|
|
|
+ item = DisturbanceValues.FindItemByText(texts[i]);
|
|
|
+ if (item != null)
|
|
|
+ actualValues.push(item.value);
|
|
|
+ }
|
|
|
+ return actualValues;
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ @Html.DevExpress().PopupControl(s =>
|
|
|
+{
|
|
|
+ s.Name = "devPopupControlEditDeviation";
|
|
|
+
|
|
|
+ if (Model.Id == -1)
|
|
|
+ s.HeaderText = "Neue Vertragsabweichung erstellen";
|
|
|
+ else
|
|
|
+ s.HeaderText = "\"" + Model.CustomNumber + "\" bearbeiten";
|
|
|
+
|
|
|
+ s.Modal = true;
|
|
|
+ s.Width = new Unit(700, UnitType.Pixel);
|
|
|
+ s.CloseAction = CloseAction.CloseButton;
|
|
|
+ s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
|
|
|
+ s.PopupVerticalAlign = PopupVerticalAlign.TopSides;
|
|
|
+ s.PopupVerticalOffset = 10;
|
|
|
+ s.AllowDragging = false;
|
|
|
+ s.AllowResize = false;
|
|
|
+ s.ShowFooter = false;
|
|
|
+ s.ShowOnPageLoad = true;
|
|
|
+ s.SetContent(() =>
|
|
|
+ {
|
|
|
+ using (Html.BeginForm("EditDeviation", "Deviation", FormMethod.Post, new { id = "deviationEditForm" }))
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write("<div class='editFormWrapper'>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelPropertyContainer'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 15%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.CustomNumber, "Nummer:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.CustomNumber).ToHtmlString());
|
|
|
+ Html.DevExpress().TextBoxFor(m => m.CustomNumber, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(80, UnitType.Percentage);
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 55%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Description, "Bezeichnung:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Description).ToHtmlString());
|
|
|
+ Html.DevExpress().TextBoxFor(m => m.Description, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(92, UnitType.Percentage);
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 30%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.ReceiptDate, "Einreichdatum VA:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.ReceiptDate).ToHtmlString());
|
|
|
+ Html.DevExpress().DateEditFor(m => m.ReceiptDate, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelPropertyContainer'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 40%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.DisturbanceValues, "Kategorien:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.DisturbanceValues).ToHtmlString());
|
|
|
+ Html.DevExpress().DropDownEdit(t =>
|
|
|
+ {
|
|
|
+ t.Name = "devDropDownListDisturbanceValues";
|
|
|
+ t.Width = new Unit(95, UnitType.Percentage);
|
|
|
+
|
|
|
+ if (Model.DisturbanceDescriptions != null && Model.DisturbanceDescriptions.Any())
|
|
|
+ t.Text = String.Join(", ", Model.DisturbanceDescriptions);
|
|
|
+
|
|
|
+ t.SetDropDownWindowTemplateContent(l =>
|
|
|
+ {
|
|
|
+ Html.DevExpress().ListBox(lb =>
|
|
|
+ {
|
|
|
+ lb.Name = "DisturbanceValues";
|
|
|
+ lb.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ lb.Properties.TextField = "Description";
|
|
|
+ lb.Properties.ValueField = "Id";
|
|
|
+ lb.Properties.ValueType = typeof(int);
|
|
|
+ lb.Properties.SelectionMode = ListEditSelectionMode.CheckColumn;
|
|
|
+ lb.ControlStyle.Border.BorderStyle = BorderStyle.None;
|
|
|
+ lb.PreRender = (sender, e) =>
|
|
|
+ {
|
|
|
+ var listBox = sender as MVCxListBox;
|
|
|
+
|
|
|
+ foreach (ListEditItem listItem in listBox.Items)
|
|
|
+ {
|
|
|
+ if (Model.DisturbanceValues == null || !Model.DisturbanceValues.Any(m => m == (int)listItem.Value)) continue;
|
|
|
+
|
|
|
+ listItem.Selected = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ listBox.Items.Insert(0, new ListEditItem("(Alle auswählen)", -1));
|
|
|
+ };
|
|
|
+ lb.Properties.ClientSideEvents.SelectedIndexChanged = "function (s, e) { onListBoxSelectionChanged(s, e); }";
|
|
|
+ }).BindList(ViewData["AllDisturbances"]).Render();
|
|
|
+
|
|
|
+ t.Properties.ClientSideEvents.TextChanged = "function (s, e) { synchronizeListBoxValues(s, e); }";
|
|
|
+ t.Properties.ClientSideEvents.DropDown = "function (s, e) { synchronizeListBoxValues(s, e); }";
|
|
|
+ });
|
|
|
+ }).Render();
|
|
|
+
|
|
|
+ if (userContext.CurrentUser.HasFunction("Deviation-Claims-Edit"))
|
|
|
+ {
|
|
|
+ Html.DevExpress().HyperLink(t =>
|
|
|
+ {
|
|
|
+ t.Name = "devHyperLinkDisturbanceEventReceiver";
|
|
|
+ t.Properties.Text = "Hinzufügen";
|
|
|
+ t.NavigateUrl = "#";
|
|
|
+ t.Properties.ClientSideEvents.Click = "function (s, e) { addDisturbance(); }";
|
|
|
+ t.Style.Add("line-height", "24px");
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 22%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Value, "Schätzung VA:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Value).ToHtmlString());
|
|
|
+ Html.DevExpress().SpinEditFor(m => m.Value, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(90, UnitType.Percentage);
|
|
|
+ t.Properties.DecimalPlaces = 2;
|
|
|
+ t.Properties.NumberType = SpinEditNumberType.Float;
|
|
|
+ t.Properties.DisplayFormatString = "c2";
|
|
|
+ t.Properties.ClientSideEvents.ValueChanged = "function (s, e) { calculateValue(); }";
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 16%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Value, "Bewertung (%):"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Value).ToHtmlString());
|
|
|
+ Html.DevExpress().SpinEditFor(m => m.Percentage, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(88, UnitType.Percentage);
|
|
|
+ t.Properties.DecimalPlaces = 0;
|
|
|
+ t.Properties.MaxValue = 100;
|
|
|
+ t.Properties.MinValue = 0;
|
|
|
+ t.Properties.NumberType = SpinEditNumberType.Integer;
|
|
|
+ t.Properties.DisplayFormatString = "{0:n0} %";
|
|
|
+ t.Properties.ClientSideEvents.ValueChanged = "function (s, e) { calculateValue(); }";
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 22%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Value, "Wert:"));
|
|
|
+ Html.DevExpress().SpinEdit(t =>
|
|
|
+ {
|
|
|
+ t.Name = "Sum";
|
|
|
+ t.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ t.ClientEnabled = false;
|
|
|
+ t.Properties.DecimalPlaces = 2;
|
|
|
+ t.Properties.NumberType = SpinEditNumberType.Float;
|
|
|
+ t.Properties.DisplayFormatString = "c2";
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelPropertyContainer'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 50%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.AppendixId, "Nachtrag:"));
|
|
|
+
|
|
|
+ Session.Add("DeviationAppendicesComboBoxSettings", new Action<ComboBoxSettings>(a =>
|
|
|
+ {
|
|
|
+ a.Width = new Unit(95, UnitType.Percentage);
|
|
|
+ a.Properties.ValueType = typeof(int);
|
|
|
+ a.Properties.ValueField = "Id";
|
|
|
+ a.Properties.TextField = "Description";
|
|
|
+
|
|
|
+ var serializedModel = Newtonsoft.Json.JsonConvert.SerializeObject(Model);
|
|
|
+
|
|
|
+ a.CallbackRouteValues = new
|
|
|
+ {
|
|
|
+ Controller = "DataCallback",
|
|
|
+ Action = "AppendicesComboBox",
|
|
|
+ SettingsKey = "DeviationAppendicesComboBoxSettings",
|
|
|
+ Model = serializedModel,
|
|
|
+ Type = Model.GetType().FullName
|
|
|
+ };
|
|
|
+ }));
|
|
|
+ ViewData.Add("AppendicesComboBoxSettings", "DeviationAppendicesComboBoxSettings");
|
|
|
+ Html.RenderPartial("~/Views/Shared/DataEditorTemplates/_AppendicesComboBox.cshtml", Model, ViewData);
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 50%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.AppendixDate, "Einreichdatum NT:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.AppendixDate).ToHtmlString());
|
|
|
+ Html.DevExpress().DateEditFor(m => m.AppendixDate, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelPropertyContainer'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 50%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.StatusId, "VA-Status:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.StatusId).ToHtmlString());
|
|
|
+
|
|
|
+ Session.Add("DeviationStatusesComboBoxSettings", new Action<ComboBoxSettings>(a =>
|
|
|
+ {
|
|
|
+ a.Width = new Unit(95, UnitType.Percentage);
|
|
|
+ a.Properties.ValueType = typeof(int);
|
|
|
+ a.Properties.ValueField = "Id";
|
|
|
+ a.Properties.TextField = "Description";
|
|
|
+
|
|
|
+ var serializedModel = Newtonsoft.Json.JsonConvert.SerializeObject(Model);
|
|
|
+
|
|
|
+ a.CallbackRouteValues = new
|
|
|
+ {
|
|
|
+ Controller = "DataCallback",
|
|
|
+ Action = "StatusesComboBox",
|
|
|
+ SettingsKey = "DeviationStatusesComboBoxSettings",
|
|
|
+ Model = serializedModel,
|
|
|
+ Type = Model.GetType().FullName
|
|
|
+ };
|
|
|
+ }));
|
|
|
+ ViewData.Add("StatusesComboBoxSettings", "DeviationStatusesComboBoxSettings");
|
|
|
+ Html.RenderPartial("~/Views/Shared/DataEditorTemplates/_StatusesComboBox.cshtml", Model, ViewData);
|
|
|
+
|
|
|
+ if (userContext.CurrentUser.HasFunction("Deviation-Claims-Edit"))
|
|
|
+ {
|
|
|
+ Html.DevExpress().HyperLink(t =>
|
|
|
+ {
|
|
|
+ t.Name = "devHyperLinkStatusEventReceiver";
|
|
|
+ t.Properties.Text = "Hinzufügen";
|
|
|
+ t.NavigateUrl = "#";
|
|
|
+ t.Properties.ClientSideEvents.Click = "function (s, e) { addStatus(); }";
|
|
|
+ t.Style.Add("line-height", "24px");
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ //ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 33%'>");
|
|
|
+ //{
|
|
|
+ // ViewContext.Writer.Write(Html.CustomLabelFor(m => m.DisturbanceId, "Verzögerung:"));
|
|
|
+ // ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.DisturbanceId).ToHtmlString());
|
|
|
+
|
|
|
+ // Session.Add("DeviationDisturbancesComboBoxSettings", new Action<ComboBoxSettings>(a =>
|
|
|
+ // {
|
|
|
+ // a.Width = new Unit(95, UnitType.Percentage);
|
|
|
+ // a.Properties.ValueType = typeof(int);
|
|
|
+ // a.Properties.ValueField = "Id";
|
|
|
+ // a.Properties.TextField = "Description";
|
|
|
+
|
|
|
+ // var serializedModel = Newtonsoft.Json.JsonConvert.SerializeObject(Model);
|
|
|
+
|
|
|
+ // a.CallbackRouteValues = new
|
|
|
+ // {
|
|
|
+ // Controller = "DataCallback",
|
|
|
+ // Action = "DisturbancesComboBox",
|
|
|
+ // SettingsKey = "DeviationDisturbancesComboBoxSettings",
|
|
|
+ // Model = serializedModel,
|
|
|
+ // Type = Model.GetType().FullName
|
|
|
+ // };
|
|
|
+ // }));
|
|
|
+ // ViewData.Add("DisturbancesComboBoxSettings", "DeviationDisturbancesComboBoxSettings");
|
|
|
+ // Html.RenderPartial("~/Views/Shared/DataEditorTemplates/_DisturbancesComboBox.cshtml", Model, ViewData);
|
|
|
+
|
|
|
+ // if (userContext.CurrentUser.HasFunction("Deviation-Claims-Edit"))
|
|
|
+ // {
|
|
|
+ // Html.DevExpress().HyperLink(t =>
|
|
|
+ // {
|
|
|
+ // t.Name = "devHyperLinkDisturbanceEventReceiver";
|
|
|
+ // t.Properties.Text = "Hinzufügen";
|
|
|
+ // t.NavigateUrl = "#";
|
|
|
+ // t.Properties.ClientSideEvents.Click = "function (s, e) { addDisturbance(); }";
|
|
|
+ // t.Style.Add("line-height", "24px");
|
|
|
+ // }).Render();
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 50%'>");
|
|
|
+ {
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.KindId, "Art:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.KindId).ToHtmlString());
|
|
|
+
|
|
|
+ Session.Add("DeviationKindsComboBoxSettings", new Action<ComboBoxSettings>(a =>
|
|
|
+ {
|
|
|
+ a.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ a.Properties.ValueType = typeof(int);
|
|
|
+ a.Properties.ValueField = "Id";
|
|
|
+ a.Properties.TextField = "Description";
|
|
|
+
|
|
|
+ var serializedModel = Newtonsoft.Json.JsonConvert.SerializeObject(Model);
|
|
|
+
|
|
|
+ a.CallbackRouteValues = new
|
|
|
+ {
|
|
|
+ Controller = "DataCallback",
|
|
|
+ Action = "KindsComboBox",
|
|
|
+ SettingsKey = "DeviationKindsComboBoxSettings",
|
|
|
+ Model = serializedModel,
|
|
|
+ Type = Model.GetType().FullName
|
|
|
+ };
|
|
|
+ }));
|
|
|
+ ViewData.Add("KindsComboBoxSettings", "DeviationKindsComboBoxSettings");
|
|
|
+ Html.RenderPartial("~/Views/Shared/DataEditorTemplates/_KindsComboBox.cshtml", Model, ViewData);
|
|
|
+
|
|
|
+ if (userContext.CurrentUser.HasFunction("Deviation-Claims-Edit"))
|
|
|
+ {
|
|
|
+ Html.DevExpress().HyperLink(t =>
|
|
|
+ {
|
|
|
+ t.Name = "devHyperLinkKindEventReceiver";
|
|
|
+ t.Properties.Text = "Hinzufügen";
|
|
|
+ t.NavigateUrl = "#";
|
|
|
+ t.Properties.ClientSideEvents.Click = "function (s, e) { addKind(); }";
|
|
|
+ t.Style.Add("line-height", "24px");
|
|
|
+ }).Render();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Comment, "Kommentar:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Comment).ToHtmlString());
|
|
|
+ Html.DevExpress().MemoFor(m => m.Comment, t =>
|
|
|
+ {
|
|
|
+ t.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ t.Height = new Unit(90, UnitType.Pixel);
|
|
|
+ }).Render();
|
|
|
+
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
+
|
|
|
+ Html.RenderPartial(
|
|
|
+ "~/Views/Shared/_PopupButtonPanel.cshtml",
|
|
|
+ new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
|
|
|
+ {
|
|
|
+ PopupName = "devPopupControlEditDeviation",
|
|
|
+ AcceptFunction = "function (s, e) { saveDeviation(); }"
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ s.Styles.Content.Paddings.Padding = new Unit(0);
|
|
|
+ s.Styles.ModalBackground.Opacity = 0;
|
|
|
+}).GetHtml()
|
|
|
+</div>
|