public void InitializeNewCall()
        {
            IsCallInProgress = true;

            btnHoldCall.Enabled = true;

            btnLogCall.Text = "End Call";

            CurrentCall               = new call();
            CurrentCall.created_on    = DateTime.Now;
            CurrentCall.claim_id      = Claim.id;
            CurrentCall.OnHoldSeconds = 0;
            CurrentCall.operatordata  = ActiveUser.UserObject.username;
            CurrentCall.updated_on    = DateTime.Now;
            CurrentCall.Save();
            currentCallNode                    = new CallTreeCallNode(CurrentCall);
            currentCallNode.ImageIndex         = 5;
            currentCallNode.SelectedImageIndex = 5;

            // Initialize CallTreeView
            foreach (question q in Questions)
            {
                if (String.IsNullOrEmpty(q.required_answer))
                {
                    AddQuestionToTree(q, (TreeNode)currentCallNode);
                }
            }
            _numQuestionsAnswered = 0;
            tvwCall.Nodes.Add(currentCallNode);
            currentCallNode.NodeFont = new Font(tvwCall.Font, FontStyle.Bold);
            currentCallNode.Expand();
            currentCallNode.EnsureVisible();

            notesGrid.CurrentCall = CurrentCall;
        }
        private void InitializeNewCall()
        {
            CurrentCall               = new call();
            CurrentCall.created_on    = DateTime.Now;
            CurrentCall.claim_id      = LinkedClaim.id;
            CurrentCall.OnHoldSeconds = 0;
            CurrentCall.operatordata  = ActiveUser.UserObject.username;
            CurrentCall.updated_on    = DateTime.Now;
            CurrentCall.StartTime     = DateTime.Now;
            CurrentCall.parent_id     = 0;
            CurrentCall.Save();
            ctlStatusHandler.Initialize(LinkedClaim.company_id);

            mainQuestionViewer.CurrentCall = CurrentCall;
            ngDisplay.CurrentCall          = CurrentCall;
            ActiveUser.LogAction(ActiveUser.ActionTypes.StartCall, LinkedClaim.id, CurrentCall.id, LinkedClaim.PatientName);

            callTime = new TimeSpan();
            callTimer.Start();
            lblCallTime.Visible        = true;
            ctlStatusHandler._category = null;

            ctlDataVerification.Initialize();

            if (CallStarted != null)
            {
                CallStarted(this, new EventArgs());
            }
        }
 private void EndCall()
 {
     callTimer.Stop();
     EndAllActiveCalls();
     ActiveUser.LogAction(ActiveUser.ActionTypes.EndMultiClaimCall, 0, FormCall.id, "");
     FormCall.DurationSeconds = Convert.ToInt32(callTime.TotalSeconds);
     FormCall.Save();
 }
        private call GetNewCall()
        {
            call toReturn = new call();

            toReturn.created_on   = DateTime.Now;
            toReturn.claim_id     = 0;
            toReturn.operatordata = ActiveUser.UserObject.username;
            toReturn.StartTime    = DateTime.Now;
            toReturn.parent_id    = 0;
            toReturn.Save();
            return(toReturn);
        }