public static void 托收(ArchiveOperationForm masterForm) { 承兑汇票 entity = masterForm.DisplayManager.CurrentItem as 承兑汇票; if (entity == null) return; if (entity.Submitted) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此承兑汇票已操作完全!"); return; } if (entity.托收贴现.HasValue) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此承兑汇票已" + entity.托收贴现.Value + "!"); return; } masterForm.DoEdit(); entity.托收贴现 = 托收贴现.托收; masterForm.ControlManager.OnCurrentItemChanged(); }
public static void 作废支票(ArchiveOperationForm masterForm) { 支票 entity = masterForm.DisplayManager.CurrentItem as 支票; if (entity == null) return; if (entity.Submitted) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此支票不能作废!"); return; } if (entity.是否作废) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此支票已作废!"); return; } masterForm.DoEdit(); entity.是否作废 = true; masterForm.ControlManager.OnCurrentItemChanged(); }
public static void 审核人修改(ArchiveOperationForm masterForm) { 凭证 pz = masterForm.DisplayManager.CurrentItem as 凭证; if (pz == null) { MessageForm.ShowError("请选择要修改的凭证!"); return; } pz.操作人 = "审核人"; masterForm.DoEdit(); }
public static void 银行返回(ArchiveOperationForm masterForm) { 承兑汇票 entity = masterForm.DisplayManager.CurrentItem as 承兑汇票; if (entity == null) return; if (entity.Submitted) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此承兑汇票已操作完全!"); return; } if (!entity.托收贴现.HasValue) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此承兑汇票还未托收或贴现"); return; } if (entity.返回方式.HasValue) { ServiceProvider.GetService<IMessageBox>().ShowWarning("此承兑汇票已" + entity.返回方式.Value + "返回!"); return; } masterForm.DoEdit(); entity.返回方式 = 承兑汇票返回方式.银行; if (entity.托收贴现 == 托收贴现.托收) { entity.返回金额 = entity.金额; } entity.Submitted = true; masterForm.ControlManager.OnCurrentItemChanged(); }