경우 1
base.InvokeService<StatusClient, Status.Status, UpdateCompletedEventArgs, string>(strReturn => AcceptAction(strReturn), lst);
protected void AcceptAction(string returnValue)
{
//To do.
}
--------------------------------------------------------------------------------------
경우 2
Action<DataSet> onComplete = delegate(DataSet ds)
{
//To do.
};
base.InvokeServiceDataSet<EquipmentStatusClient, EquipmentStatus.EquipmentStatus, ListCompletedEventArgs>(onComplete, dic);
--------------------------------------------------------------------------------------------------------------------------
경우 3
private void Test(DataSet ds)
{
//To do.
}
Action<DataSet> onComplete = x => Test(x);
base.InvokeServiceDataSet<ManageClient, Manage.Manage, ListCompletedEventArgs>(onComplete, this.SearchKeyword);
--------------------------------------------------------------------------------------------------------------------------
경우 4
private void btxtModelNm_DefaultButtonClick(object sender, RoutedEventArgs e)
{
var pop = new FindModel("5109000", cmbPowerEquipType.SelectedIndex < 1? "" : cmbPowerEquipType.GetSelectedValue("Code"));
//var pop = new FindModel();
OpenDialog(pop, () =>
{
var item = btxtModelName.DataContext as BindableObject;
item.SetValue("EquipDvsCode2", pop.Model.GetValue("EquipDvsCode2"));
});
}
private void OpenDialog(OnsUserControlBase control, Action callback)
{
using (_popup = new HostWindow(control))
{
_popup.ShowDialog();
_popup.Closed += (o, args) =>
{
if (_popup.DialogResult == DevExpress.Xpf.Core.DialogResult.OK && callback != null)
callback();
};
}
}
위 소스는 특정 환경에서 실행 되는 것이어서 참고만.
'C#' 카테고리의 다른 글
[Lambda] DataTable 조건 조회 Where,FirstOrDefault (0) | 2015.08.26 |
---|---|
Collection(List)에 데이터 넣기 (0) | 2015.08.26 |
CSV 파일 읽어오기 (0) | 2015.08.21 |
Dictionary 관련 유용코드 (0) | 2015.08.21 |
c# Extention Code 확장 메서드 모음. (0) | 2015.08.21 |
댓글