本文整理汇总了C#中Order.LoadSingleObject方法的典型用法代码示例。如果您正苦于以下问题:C# Order.LoadSingleObject方法的具体用法?C# Order.LoadSingleObject怎么用?C# Order.LoadSingleObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order.LoadSingleObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveOrderClick
private void SaveOrderClick(object sender, EventArgs e)
{
_errorProvider.SetError(orderTitle, string.IsNullOrEmpty(orderTitle.Text) ? "Bitte einen gültigen Wert eingeben" : "");
_errorProvider.SetError(orderTitle, string.IsNullOrEmpty(orderKind.Text) ? "Bitte einen gültigen Wert eingeben" : "");
if(!_errorProvider.HasErrors)
{
var order = new Order
{
Identity = OrderId,
};
order.LoadSingleObject();
var newId = order.CopyOrder();
order.OrderName = order.OrderName.Replace("[Kopie]", "[Vordefiniert]");
order.IsPredefined = true;
order.SaveObject();
new PredefinedOrder
{
Name = orderTitle.Text,
Kind = orderKind.Text,
Pages = (int)pages.Value,
ColorBack = (int)colorBack.Value,
ColorFront = (int)colorFront.Value,
FkOrderId = newId,
Quantity = (int)quantity.Value,
}.SaveObject();
Close();
}
}
示例2: EditPredefinedOrder
private void EditPredefinedOrder(object sender, EventArgs e)
{
if (FocusedRow.Usable())
{
var order = new Order
{
Identity = FocusedRow.FkOrderId,
};
order.LoadSingleObject();
new OrderRibbonView(order).Show();
}
}
示例3: OrderSearchLookUpEditValueChanging
private void OrderSearchLookUpEditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e)
{
var oldOrder = new Order { Identity = (int)e.OldValue };
oldOrder.LoadSingleObject();
oldOrder.DeleteObject();
var newOrder = new Order { Identity = (int)e.NewValue };
newOrder.LoadSingleObject();
newOrder.CopyOrder();
newOrder.IsPredefined = true;
newOrder.OrderName = newOrder.OrderName.Replace("[Kopie]", "[Predefined]");
newOrder.SaveObject();
e.NewValue = newOrder.Identity;
}