Exemplo n.º 1
0
 public VisitMaintain()
 {
     InitializeComponent();
     facade   = new CustomerVisitFacade();
     PageView = new CustomerVisitMaintainView()
     {
         Log = new VisitLogVM()
         {
             CallResult    = VisitCallResult.Connected,
             DealStatus    = VisitDealStatus.FollowUp,
             ConsumeDesire = YNStatusThree.Uncertain
         },
         Customer = new CustomerMaster()
     };
     Loaded += new RoutedEventHandler(VisitMaintain_Loaded);
     tbcVisit.SelectionChanged += new SelectionChangedEventHandler(tbcVisit_SelectionChanged);
 }
Exemplo n.º 2
0
        public void AddLog(CustomerVisitMaintainView view, System.Action action)
        {
            string relativeUrl = "/CustomerService/Visit/AddLog";

            view.Log.CompanyCode = CPApplication.Current.CompanyCode;
            VisitLog log = EntityConverter <VisitLogVM, VisitLog> .Convert(view.Log);

            restClient.Create <VisitLog>(relativeUrl, log, (sender, e) =>
            {
                if (e.FaultsHandle())
                {
                    return;
                }
                if (action != null)
                {
                    action();
                }
            });
        }