Beispiel #1
0
        public virtual void CreateFollowUpLog(CallsEventsFollowUpLog entity)
        {
            DataCommand cmd = DataCommandManager.GetDataCommand("InsertCallsEventsFollowUpLog");

            cmd.SetParameterValue(entity);
            cmd.ExecuteNonQuery();
        }
Beispiel #2
0
        public virtual void CreateCallsEventsFollowUpLog(CallsEventsFollowUpLog request)
        {
            //保存来电事件和跟进日志的状态一致
            CallsEvents entity = ObjectFactory <CallsEventsProcessor> .Instance.Load(request.CallsEventsSysNo.Value);

            using (TransactionScope scope = new TransactionScope())
            {
                if (request.Status == CallsEventsStatus.Replied)
                {
                    entity.LastEditDate = DateTime.Now;
                    entity.CloseDate    = null;
                    entity.Status       = CallsEventsStatus.Replied;
                    ObjectFactory <ICallsEventsDA> .Instance.UpdateEvents(entity);
                }
                else if (request.Status == CallsEventsStatus.Abandoned)
                {
                    entity.LastEditDate = DateTime.Now;
                    entity.CloseDate    = null;
                    entity.Status       = CallsEventsStatus.Abandoned;
                    ObjectFactory <ICallsEventsDA> .Instance.UpdateEvents(entity);
                }
                else
                {
                    entity.Status = CallsEventsStatus.Handled;
                    this.CloseCallsEvents(entity);
                }
                ObjectFactory <ICallsEventsDA> .Instance.CreateFollowUpLog(request);

                scope.Complete();
            }
        }
Beispiel #3
0
 private void ButtonSave_Click(object sender, RoutedEventArgs e)
 {
     ButtonSave.IsEnabled = false;
     ValidationManager.Validate(this.newGrid);
     if (viewModel.NewCallingLog.HasValidationErrors)
     {
         ButtonSave.IsEnabled = true;
         return;
     }
     if (string.IsNullOrEmpty(viewModel.CustomerID) && string.IsNullOrEmpty(viewModel.Phone))
     {
         CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerCallingMaintain.msg_VaildateCustomer);
         ButtonSave.IsEnabled = true;
         return;
     }
     if (viewModel.SysNo == null || viewModel.SysNo <= 0)
     {
         CallsEvents callingEntity = viewModel.ConvertVM <CustomerCalingMaintainVM, CallsEvents>();
         callingEntity.LogList = new List <CallsEventsFollowUpLog>();
         callingEntity.LogList.Add(viewModel.NewCallingLog.ConvertVM <CallingLogVM, CallsEventsFollowUpLog>());
         callingEntity.Status = callingEntity.LogList[0].Status;
         new CustomerCallingFacade(CPApplication.Current.CurrentPage).CreateCallsEvents(callingEntity, (obj, args) =>
         {
             if (args.FaultsHandle())
             {
                 ButtonSave.IsEnabled = true;
                 return;
             }
             ButtonSave.IsEnabled    = callingEntity.Status != CallsEventsStatus.Handled;
             viewModel.NewCallingLog = new CallingLogVM();
             CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerCallingMaintain.msg_OperateSuccess);
             Dialog.ResultArgs.DialogResult = DialogResultType.OK;
             Dialog.Close();
         });
     }
     else
     {
         CallsEventsFollowUpLog entity = new CallsEventsFollowUpLog();
         entity = viewModel.NewCallingLog.ConvertVM <CallingLogVM, CallsEventsFollowUpLog>();
         entity.CallsEventsSysNo = viewModel.SysNo;
         new CustomerCallingFacade(CPApplication.Current.CurrentPage).CreateCallsEventsFollowUpLog(entity, (obj, args) =>
         {
             if (args.FaultsHandle())
             {
                 ButtonSave.IsEnabled = true;
                 return;
             }
             ButtonSave.IsEnabled    = entity.Status != CallsEventsStatus.Handled;
             viewModel.NewCallingLog = new CallingLogVM();
             dataGridLogList.Bind();
             needRefulshList = true;
         });
     }
 }
Beispiel #4
0
        public void CreateCallsEventsFollowUpLog(CallsEventsFollowUpLog request, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            string relativeUrl = "/CustomerService/CallsEvents/CreateCallsEventsFollowUpLog";

            restClient.Create(relativeUrl, request, callback);
        }
Beispiel #5
0
 public virtual void CreateCallsEventsFollowUpLog(CallsEventsFollowUpLog request)
 {
     ObjectFactory <CallsEventsProcessor> .Instance.CreateCallsEventsFollowUpLog(request);
 }
Beispiel #6
0
 public void CreateCallsEventsFollowUpLog(CallsEventsFollowUpLog request)
 {
     ObjectFactory <CallsEventsAppService> .Instance.CreateCallsEventsFollowUpLog(request);
 }