This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Erp.UI.App.CustomerTracker; // or Erp.UI.App.CustomerEntry when in Customer entry form | |
using Infragistics.Win.UltraWinDock; | |
CustomerDock customerDock = (CustomerDock)csm.GetNativeControlReference("197d7d6d-2443-47c7-b8ef-aa6cd9a95267"); | |
DockableControlPane taxCertCustomerTab = customerDock.baseDockManager.ControlPanes | |
.Cast<DockableControlPane>() | |
.Where(x => x.TextTab == "Tax Certification") | |
.FirstOrDefault(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ControlSettings styleOrange = new ControlSettings(); | |
styleOrange.StyleSetName = "styleOrange"; | |
styleOrange.BackColor = System.Drawing.Color.Orange; | |
// or like this | |
// styleOrange.BackColor = System.Drawing.Color.FromArgb(255, 165, 0); | |
this.edvOrderHead.AddRowRule(new RowRule("OrderHed.WrongShipBy", RuleCondition.Equals, true, new RuleAction[] { | |
RuleAction.AddControlSettings(this.oTrans, "OrderHed.RequestDate", styleOrange) | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UI Customization side | |
// Adding a column to the view and setting some props | |
private void UpdateWhereUsedView() | |
{ | |
EpiDataView edvPartWhereUsed = (EpiDataView)(oTrans.EpiDataViews["PartWhereUsed"]); | |
if (!edvPartWhereUsed.dataView.Table.Columns.Contains("ForecastYearQty")) | |
{ | |
edvPartWhereUsed.dataView.Table.Columns.Add(new DataColumn("ForecastYearQty", typeof(decimal))); | |
edvPartWhereUsed.dataView.Table.Columns["ForecastYearQty"].ExtendedProperties["ReadOnly"] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Sometimes after launching form from modification you want to get some data back to the form from which it was launched. | |
Short example shows the mechanism. | |
1. In CaseForm there is button that launch CustomerForm. | |
2. When we click it CustomerForm opens and we fill all data we need. | |
3. When everything is filled we save it and close CustomerForm. | |
4. The newly added customer is going back to the CaseForm Customer field. | |
*/ | |
// CaseForm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Available conditions for rules | |
Column Value Changes - The value within the field is changed from its previous value. | |
Contains - The field, previously blank, now holds data. | |
Custom Condition - Select this option to create a condition using custom code. | |
Ends With - The field value ends with the same characters you specify within the rule. | |
Equals - The field value is the same as a value you specify within the rule. | |
Greater Than -The field value is larger than a value you specify within the rule. | |
Greater Than Or Equal To - The field value is larger than or equal to a value you specify within the rule. | |
Less Than - The field value is smaller than a value you specify within the rule. | |
Less Than Or Equal To - The field value is smaller than or equal to a value you specify within the rule. |