Exemple #1
0
        public CallLogController(ICallLog view, Phone phone)
        {
            _view  = view;
            _phone = phone;

            string employee;

            if (_phone.Owner != null)
            {
                employee = _phone.Owner.ToString();
            }
            else
            {
                employee = "-";
            }
            _view.ShowInfo(_phone.ToString(), _phone.Unit.TypeToString() + " " + _phone.Unit.ToString(), employee);

            decimal total = 0;

            foreach (Call call in _phone.showCallLog())
            {
                string[] row = new string[6];
                row[0] = call.CallStart.ToString();
                row[1] = call.Length.ToString();
                row[2] = call.CalledParty.ToString();
                row[3] = call.CallingParty.ToString();

                if (_phone == call.CalledParty)
                {
                    row[4] = "0";
                    row[5] = "0";
                }
                else
                {
                    if (call.CalledParty.Tariff == call.CallingParty.Tariff)
                    {
                        row[4] = call.CallingParty.Tariff.InternalCost.ToString();
                    }
                    else
                    {
                        row[4] = call.CallingParty.Tariff.ExternalCost.ToString();
                    }
                    row[5] = call.Cost.ToString();
                    total += call.Cost;
                }

                _view.ShowList(row);
            }

            string[] last = new string[6];
            last[0] = "Total";
            last[1] = "";
            last[2] = "";
            last[3] = "";
            last[4] = "";
            last[5] = total.ToString();
            _view.ShowList(last);

            _view.SetController(this);
        }
 public PendingCallsController()
 {
     _customerSupport  = new CustomerSupport();
     _RepoCallLog      = new CallLog();
     _dropdown         = new DropdownBindController();
     _emailSmsServices = new EmailsmsServices();
     _templateRepo     = new Template();
 }
Exemple #3
0
 public ServiceCenterController()
 {
     _centerRepo       = new Center();
     _dropdown         = new DropdownBindController();
     _empRepo          = new Employee();
     _log              = new CallLog();
     _emailSmsServices = new EmailsmsServices();
     _templateRepo     = new Template();
 }
 public ClientDataController()
 {
     _RepoUploadFile   = new UploadFiles();
     _dropdown         = new DropdownBindController();
     _RepoCallLog      = new CallLog();
     _centerRepo       = new Center();
     _contactPerson    = new ContactPerson();
     _emailSmsServices = new EmailsmsServices();
     _templateRepo     = new Template();
 }
 public void OpenCallLog(ICallLog callLog)
 {
     Phone             phone             = _listPhones[_view.currentPhone];
     CallLogController callLogController = new CallLogController(callLog, phone);
 }