Esempio n. 1
0
        private void btnGiveUp_Click(object sender, EventArgs e)
        {
            object item = listView1.SelectedItems[0].Tag;
            var    call = item as BCallModel;

            call.state = -1;
            cBll.Update(call);
            btnQuery_Click(null, null);
        }
Esempio n. 2
0
 //评价
 private void EvaluateService()
 {
     lock (objLock)
     {
         LockAction.RunWindowLock(windowNo, () =>
         {
             stateModel = csBll.GetModelByWindowNo(windowNo);
             if (stateModel == null)
             {
                 stateModel           = new FCallStateModel();
                 stateModel.windowNo  = windowNo;
                 stateModel.workState = (int)WorkState.Defalt;
                 csBll.Insert(stateModel);
             }
             if (stateModel.workState == (int)WorkState.PauseService)
             {
                 this.client.SendMessage(new OperateMessage()
                 {
                     WindowNo = windowNo, Operate = Operate.Reset
                 });
                 stateModel.workState = stateModel.pauseState;
                 csBll.Update(stateModel);
             }
             if (stateModel.workState == (int)WorkState.Call)
             {
                 try
                 {
                     var model = cBll.GetModel(stateModel.callId);
                     if (model == null)
                     {
                         return;
                     }
                     model.state = 1;
                     cBll.Update(model);
                     stateModel.workState = (int)WorkState.Evaluate;
                     //stateModel.callId = 0;
                     stateModel.ticketNo = "";
                     csBll.Update(stateModel);
                     client.SendMessage(new RateMessage() //发送评价请求
                     {
                         WindowNo   = windowNo,
                         RateId     = model.handleId,
                         ItemName   = "项目名称",
                         WorkDate   = DateTime.Now.ToShortDateString(),
                         Transactor = model.qNmae,
                         reserveSeq = model.reserveSeq
                     }
                                        );
                     //SendWait(adress);
                     string mess = " [" + model.ticketNumber + "]号已评价。";
                     this.Invoke(new Action(() => { this.listView1.Items.Add(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff") + " : [" + model.ticketNumber + "]号已评价。"); }));
                     WriterCallLog(2, mess);
                 }
                 catch (Exception ex)
                 {
                     WriterLog("评价异常:" + ex.Message);
                 }
             }
             else
             {
                 if (stateModel.workState == (int)WorkState.Defalt || stateModel.workState == (int)WorkState.Evaluate)
                 {
                     //SendWait(adress);
                 }
             }
         });
     }
 }