|
|
@@ -4,130 +4,28 @@
|
|
|
var userContext = GreenTree.Nachtragsmanagement.Core.CommonHelper.UserContext();
|
|
|
}
|
|
|
|
|
|
-@model GreenTree.Nachtragsmanagement.Web.Models.Deviation.DeviationDataModel
|
|
|
+@model GreenTree.Nachtragsmanagement.Web.Models.Site.SiteDataModel
|
|
|
|
|
|
-<div class="deviationEditContainer">
|
|
|
+<div class="siteEditContainer">
|
|
|
|
|
|
<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";
|
|
|
+ s.Name = "devPopupControlEditSite";
|
|
|
|
|
|
if (Model.Id == -1)
|
|
|
- s.HeaderText = "Neue Vertragsabweichung erstellen";
|
|
|
+ s.HeaderText = "Neue Baustelle erstellen";
|
|
|
else
|
|
|
s.HeaderText = "\"" + Model.CustomNumber + "\" bearbeiten";
|
|
|
|
|
|
s.Modal = true;
|
|
|
- s.Width = new Unit(700, UnitType.Pixel);
|
|
|
+ s.Width = new Unit(1000, UnitType.Pixel);
|
|
|
+ //s.Height = new Unit(700, UnitType.Pixel);
|
|
|
s.CloseAction = CloseAction.CloseButton;
|
|
|
s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
|
|
|
s.PopupVerticalAlign = PopupVerticalAlign.TopSides;
|
|
|
@@ -138,7 +36,7 @@
|
|
|
s.ShowOnPageLoad = true;
|
|
|
s.SetContent(() =>
|
|
|
{
|
|
|
- using (Html.BeginForm("EditDeviation", "Deviation", FormMethod.Post, new { id = "deviationEditForm" }))
|
|
|
+ using (Html.BeginForm("EditSite", "Site", FormMethod.Post, new { id = "siteEditForm" }))
|
|
|
{
|
|
|
ViewContext.Writer.Write("<div class='editFormWrapper'>");
|
|
|
|
|
|
@@ -148,29 +46,19 @@
|
|
|
{
|
|
|
ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 15%'>");
|
|
|
{
|
|
|
- ViewContext.Writer.Write(Html.CustomLabelFor(m => m.CustomNumber, "Nummer:"));
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.CustomNumber, "Kostenstelle:"));
|
|
|
ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.CustomNumber).ToHtmlString());
|
|
|
Html.DevExpress().TextBoxFor(m => m.CustomNumber, t =>
|
|
|
{
|
|
|
- t.Width = new Unit(80, UnitType.Percentage);
|
|
|
+ t.Width = new Unit(90, UnitType.Percentage);
|
|
|
}).Render();
|
|
|
}
|
|
|
ViewContext.Writer.Write("</div>");
|
|
|
- ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 55%'>");
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 35%'>");
|
|
|
{
|
|
|
- ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Description, "Bezeichnung:"));
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Description, "Bauvorhaben:"));
|
|
|
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();
|
|
|
@@ -181,285 +69,175 @@
|
|
|
|
|
|
ViewContext.Writer.Write("<div class='inlineModelPropertyContainer'>");
|
|
|
{
|
|
|
- ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 40%'>");
|
|
|
+ ViewContext.Writer.Write("<div class='inlineModelProperty' style='width: 26%'>");
|
|
|
{
|
|
|
- ViewContext.Writer.Write(Html.CustomLabelFor(m => m.DisturbanceValues, "Kategorien:"));
|
|
|
- ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.DisturbanceValues).ToHtmlString());
|
|
|
- Html.DevExpress().DropDownEdit(t =>
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Start, "Start:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Start).ToHtmlString());
|
|
|
+ Html.DevExpress().DateEditFor(m => m.Start, 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("<div class='inlineModelProperty' style='width: 24%'>");
|
|
|
{
|
|
|
- ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Value, "Wert:"));
|
|
|
- Html.DevExpress().SpinEdit(t =>
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.End, "Ende:"));
|
|
|
+ ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.End).ToHtmlString());
|
|
|
+ Html.DevExpress().DateEditFor(m => m.End, 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(Html.CustomLabelFor(m => m.Deviations, "Vertragsabweichungen / Nachträge:"));
|
|
|
+ Html.DevExpress().TreeList(t =>
|
|
|
{
|
|
|
- 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);
|
|
|
+ t.Name = "devTreeListSiteDeviationAppendices";
|
|
|
+ t.KeyFieldName = "Id";
|
|
|
+ t.ParentFieldName = "ParentId";
|
|
|
+ t.CallbackRouteValues = new { Controller = "Site", Action = "PartialDeviationAppendices" };
|
|
|
+ t.Width = Unit.Percentage(100);
|
|
|
|
|
|
- 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%'>");
|
|
|
+ t.Columns.Add(column =>
|
|
|
{
|
|
|
- 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 =>
|
|
|
+ column.Caption = "#";
|
|
|
+ column.SetDataCellTemplateContent(c =>
|
|
|
{
|
|
|
- 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(
|
|
|
+ "<a href=\"#\" onclick=\"editDeviation(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Bearbeiten</a> " +
|
|
|
+ "<a href=\"#\" onclick=\"confirmDelete(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Löschen</a>"
|
|
|
+ );
|
|
|
+ });
|
|
|
+ });
|
|
|
+ t.Columns.Add("CustomNumber", "Nummer");
|
|
|
+ t.Columns.Add("Description", "Bezeichnung");
|
|
|
+ t.Columns.Add(column =>
|
|
|
{
|
|
|
- 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%'>");
|
|
|
+ column.Caption = "Eingang";
|
|
|
+ column.FieldName = "ReceiptDate";
|
|
|
+ column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
+ });
|
|
|
+ t.Columns.Add(column =>
|
|
|
{
|
|
|
- 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);
|
|
|
+ column.Caption = "Schätzung bew.";
|
|
|
+ column.FieldName = "PercentageValue";
|
|
|
+ column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ });
|
|
|
+ t.Columns.Add("StatusDescription", "Status");
|
|
|
+ t.Columns.Add("DisturbanceDescription", "Kategorien");
|
|
|
+ t.Columns.Add("Comment", "Kommentar");
|
|
|
}).Render();
|
|
|
+ //ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Deviations, "Vertragsabweichungen:"));
|
|
|
+ //Html.DevExpress().GridView(t =>
|
|
|
+ //{
|
|
|
+ // t.Name = "devGridViewSiteDeviations";
|
|
|
+ // t.KeyFieldName = "Id";
|
|
|
+ // t.CallbackRouteValues = new { Controller = "Deviation", Action = "PartialDeviations" };
|
|
|
+ // t.Width = Unit.Percentage(100);
|
|
|
+
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "#";
|
|
|
+ // column.SetDataItemTemplateContent(c =>
|
|
|
+ // {
|
|
|
+ // ViewContext.Writer.Write(
|
|
|
+ // "<a href=\"#\" onclick=\"editDeviation(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Bearbeiten</a> " +
|
|
|
+ // "<a href=\"#\" onclick=\"confirmDelete(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Löschen</a>"
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // column.SetHeaderTemplateContent(c =>
|
|
|
+ // {
|
|
|
+ // ViewContext.Writer.Write(
|
|
|
+ // "<a href=\"#\" onclick=\"editDeviation(-1)\">Neu</a> ");
|
|
|
+ // });
|
|
|
+ // column.Settings.AllowDragDrop = DefaultBoolean.False;
|
|
|
+ // column.Settings.AllowSort = DefaultBoolean.False;
|
|
|
+ // column.Width = 70;
|
|
|
+ // });
|
|
|
+ // t.Columns.Add("CustomNumber", "Nummer");
|
|
|
+ // t.Columns.Add("Description", "Bezeichnung");
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "Eingang";
|
|
|
+ // column.FieldName = "ReceiptDate";
|
|
|
+ // column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
+ // });
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "Schätzung bew.";
|
|
|
+ // column.FieldName = "PercentageValue";
|
|
|
+ // column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ // });
|
|
|
+ // t.Columns.Add("StatusDescription", "Status");
|
|
|
+ // t.Columns.Add("DisturbanceDescription", "Kategorien");
|
|
|
+ // t.Columns.Add("KindDescription", "Art");
|
|
|
+ // t.Columns.Add("AppendixDescription", "Nachtrag");
|
|
|
+ // t.Columns.Add("Comment", "Kommentar");
|
|
|
+ //}).Bind(Model.Deviations).Render();
|
|
|
+
|
|
|
+ //ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Appendices, "Nachträge:"));
|
|
|
+ //Html.DevExpress().GridView(t =>
|
|
|
+ //{
|
|
|
+ // t.Name = "devGridViewSiteAppendices";
|
|
|
+ // t.KeyFieldName = "Id";
|
|
|
+ // t.CallbackRouteValues = new { Controller = "Deviation", Action = "PartialDeviations" };
|
|
|
+ // t.Width = Unit.Percentage(100);
|
|
|
+
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "#";
|
|
|
+ // column.SetDataItemTemplateContent(c =>
|
|
|
+ // {
|
|
|
+ // ViewContext.Writer.Write(
|
|
|
+ // "<a href=\"#\" onclick=\"editDeviation(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Bearbeiten</a> " +
|
|
|
+ // "<a href=\"#\" onclick=\"confirmDelete(" + DataBinder.Eval(c.DataItem, "Id") + ")\">Löschen</a>"
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // column.SetHeaderTemplateContent(c =>
|
|
|
+ // {
|
|
|
+ // ViewContext.Writer.Write(
|
|
|
+ // "<a href=\"#\" onclick=\"editDeviation(-1)\">Neu</a> ");
|
|
|
+ // });
|
|
|
+ // column.Settings.AllowDragDrop = DefaultBoolean.False;
|
|
|
+ // column.Settings.AllowSort = DefaultBoolean.False;
|
|
|
+ // column.Width = 70;
|
|
|
+ // });
|
|
|
+ // t.Columns.Add("CustomNumber", "Nummer");
|
|
|
+ // t.Columns.Add("Description", "Bezeichnung");
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "Angebotssumme";
|
|
|
+ // column.FieldName = "Value";
|
|
|
+ // column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ // });
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "Eingang";
|
|
|
+ // column.FieldName = "ReceiptDate";
|
|
|
+ // column.PropertiesEdit.DisplayFormatString = "dd.MM.yyyy";
|
|
|
+ // });
|
|
|
+ // t.Columns.Add(column =>
|
|
|
+ // {
|
|
|
+ // column.Caption = "Verhandlungssumme";
|
|
|
+ // column.FieldName = "NegotiationValue";
|
|
|
+ // column.PropertiesEdit.DisplayFormatString = "c2";
|
|
|
+ // });
|
|
|
+ // t.Columns.Add("StatusDescription", "Status");
|
|
|
+ // t.Columns.Add("DisturbanceDescription", "Kategorien");
|
|
|
+ // t.Columns.Add("Comment", "Kommentar");
|
|
|
+ //}).Bind(Model.Appendices).Render();
|
|
|
+
|
|
|
+ //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>");
|
|
|
|
|
|
@@ -467,8 +245,8 @@
|
|
|
"~/Views/Shared/_PopupButtonPanel.cshtml",
|
|
|
new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
|
|
|
{
|
|
|
- PopupName = "devPopupControlEditDeviation",
|
|
|
- AcceptFunction = "function (s, e) { saveDeviation(); }"
|
|
|
+ PopupName = "devPopupControlEditSite",
|
|
|
+ AcceptFunction = "function (s, e) { saveSite(); }"
|
|
|
}
|
|
|
);
|
|
|
}
|