本文整理汇总了C#中CmsWebServiceClient.GetAttachmentTypesAsync方法的典型用法代码示例。如果您正苦于以下问题:C# CmsWebServiceClient.GetAttachmentTypesAsync方法的具体用法?C# CmsWebServiceClient.GetAttachmentTypesAsync怎么用?C# CmsWebServiceClient.GetAttachmentTypesAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsWebServiceClient
的用法示例。
在下文中一共展示了CmsWebServiceClient.GetAttachmentTypesAsync方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IssueFilesViewModel
public IssueFilesViewModel(Issue issue)
{
CompositionInitializer.SatisfyImports(this);
mIssue = issue;
var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetAttachmentTypesCompleted += (s, e) =>
{
mAttachmentTypes = e.Result;
cmsWebServiceClient.GetIssueFilesCompleted += (s1, e1) =>
{
mIssue.IssueFiles.Clear();
foreach (IssueFile attachment in e1.Result)
{
attachment.Issue = mIssue;//this brings i the distribution list we need to set padlock.
attachment.AttachmentTypes = mAttachmentTypes;
mIssue.IssueFiles.Add(attachment);
}
if (DataLoaded != null)
{
DataLoaded();
}
RaisePropertyChanged("Attachments");
};
cmsWebServiceClient.GetIssueFilesAsync(mIssue.Id);
};
cmsWebServiceClient.GetAttachmentTypesAsync();
AddButton = new DelegateCommand<object>(AddButtonHandler, CanAddHandler);
DeleteButton = new DelegateCommand<object>(DeleteButtonHandler, CanDeleteHandler);
ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
}
示例2: PipeAttachmentsViewModel
public PipeAttachmentsViewModel(Pipe pipe)
{
CompositionInitializer.SatisfyImports(this);
mPipe = pipe;
CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
cmsWebServiceClient.GetAttachmentTypesAsync();
AddButtonClick = new DelegateCommand<object>(AddButtonHandler, CanAddHandler);
DeleteButtonClick = new DelegateCommand<object>(DeleteButtonHandler, CanDeleteHandler);
ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
}
示例3: InstrumentAttachmentsViewModel
public InstrumentAttachmentsViewModel(Instrument instrumentEquipment)
{
AddAttachmentCommand = new DelegateCommand<object>(AddFileHandler, CanAdd);
RemoveAttachmentCommand = new DelegateCommand<object>(DeleteButtonHandler, CanDelete);
ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
CompositionInitializer.SatisfyImports(this);
mInstrument = instrumentEquipment;
Attachments = new ObservableCollection<InstrumentAttachment>();
CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
cmsWebServiceClient.GetAttachmentTypesAsync();
}
示例4: ElectricalEquipmentAttachmentsViewModel
public ElectricalEquipmentAttachmentsViewModel(ElectricalEquipment electricalEquipment, ElectricalAttachmentsControl view)
{
CompositionInitializer.SatisfyImports(this);
View = view;
AddAttachmentCommand = new DelegateCommand<object>(AddFileHandler, CanAdd);
RemoveAttachmentCommand = new DelegateCommand<object>(DeleteButtonHandler, CanDelete);
ExportButton = new DelegateCommand<object>(ExportButtonHandler, x => true);
mElectricalEquipment = electricalEquipment;
Attachments = new ObservableCollection<ElectricalEquipmentAttachment>();
CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetAttachmentTypesCompleted += cmsWebServiceClient_GetAttachmentTypesCompleted;
cmsWebServiceClient.GetAttachmentTypesAsync();
}
示例5: ExportAttachmentsModel
public ExportAttachmentsModel(CommonUtils.AttachmentObject attachmentObject)
{
CompositionInitializer.SatisfyImports(this);
mAttachmentObject = attachmentObject;
var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
cmsWebServiceClient.GetEquipmentAttachmentsCompleted += (s, e) =>
{
Attachments = new CmsObservableCollection<BaseEquipmentAttachment>(e.Result);
var uploaderIds = (from x in Attachments select x.UploadedById).Distinct().ToList();
var act = (from x in CMS.Cache.Users orderby x.LastName where x.ActiveUser select x).ToList();
var inact = (from x in CMS.Cache.Users orderby x.LastName where !x.ActiveUser select x).ToList();
Uploaders = new List<QuickUser>(act);
Uploaders.AddRange(inact);
var presentUploaders = (from x in Uploaders where uploaderIds.Contains(x.Id) select x).ToList();
presentUploaders.Insert(0, new QuickUser { FirstName = ALL, Id = -1, ActiveUser = true });
Uploaders = new List<QuickUser>(presentUploaders);
SelectedUploader = Uploaders[0];
mAttachmentsLoaded = true;
OnRaiseLoaded();
};
cmsWebServiceClient.GetEquipmentAttachmentsAsync(attachmentObject);
cmsWebServiceClient.GetAttachmentTypesCompleted += (s, e) =>
{
AttachmentTypes = new List<AttachmentType>(e.Result);
AttachmentTypes.Insert(0, new AttachmentType { Name = ALL, Id = -1 });
SelectedAttachmentType = AttachmentTypes[0];
mAttachmenttypesLoaded = true;
OnRaiseLoaded();
};
cmsWebServiceClient.GetAttachmentTypesAsync();
OkCommand = new DelegateCommand<object>(OkHandler, CanExecuteOkButton);
CancelCommand = new DelegateCommand<object>(CancelHandler);
}