private void BtnAnswer_Click(object sender, EventArgs e)
        {
            player.Stop();
            this.Close();
            phone_call pc = new phone_call("Answered", completeCall);

            pc.Show();
        }
        private void BtnCallClient_Click(object sender, EventArgs e)
        {
            int     index = dgvCalls.CurrentRow.Index;
            string  clientID;
            string  tableName;
            string  colName;
            string  username;
            DataSet ds;

            if (dgvCalls.Rows[index].Cells[4].Value.ToString() == "")
            {
                clientID = dgvCalls.Rows[index].Cells[5].Value.ToString();
            }
            else
            {
                clientID = dgvCalls.Rows[index].Cells[4].Value.ToString();
            }
            //First we need to get the client's info from the phoneNumber Table
            tableName = "phoneNumber";
            colName   = "clientNumber";
            ds        = access.searchForData(tableName, colName, clientID, "");
            if (ds.Tables[0].Rows.Count == 0)
            {
                Common.alertt("THIS CLIENT WAS A TEST CASE AND THUS THEY DONT HAVE A PHONE NUMBER.");
            }
            else
            {
                string phoneNumber = ds.Tables[0].Rows[0][1].ToString();
                //We go the clientID at the top so no need to get it again
                string clientType = ds.Tables[0].Rows[0][3].ToString();

                //Now we need to get the user's username depending on the clientID
                if (clientType == "individual")
                {
                    tableName = "clientIndividual";
                }
                else
                {
                    tableName = "businessClient";
                }
                colName  = "id";
                ds       = access.searchForData(tableName, colName, clientID, "");
                username = ds.Tables[0].Rows[0][5].ToString();
                //WE GOT THE FOLLOWING INFO
                //1. clientID
                //2. username
                //3. phone number
                //THEREFORE WE CAN INSTANTIATE THE CALL
                PresentationLayer.phone_call pc = new PresentationLayer.phone_call("adminstrator", clientID, username, phoneNumber, clientType);
                pc.Show();
            }
        }
Example #3
0
        private void BtnCallHelpCenter_Click(object sender, EventArgs e)
        {
            /*Manu Sidebar Navigation - START*/
            pnlNav.Height = btnCallHelpCenter.Height;
            pnlNav.Top    = btnCallHelpCenter.Top;
            pnlNav.Left   = btnCallHelpCenter.Left;
            btnCallHelpCenter.BackColor = Color.FromArgb(187, 238, 255);
            /*Manu Sidebar Navigation - END*/

            /*THIS IS TO IMPLEMENT THE CALL FUNCTIONALITY - START*/
            PresentationLayer.phone_call pc = new PresentationLayer.phone_call("client", loginPersonDetails.id);
            pc.Show();
            /*THIS IS TO IMPLEMENT THE CALL FUNCTIONALITY - END*/
        }
Example #4
0
        private void BtnCall_Click(object sender, EventArgs e)
        {
            //Since this is the client there will be no phone numbers required
            //as he or she will be calling the call center and the call center will have
            //One constant number whiche is 012 - 222 - 3333

            string phoneNumber = txtClientID.Text;
            string res         = vl.initiateOutgoingCall(phoneNumber);

            if (res.Contains(","))
            {
                string[] details           = res.Split(',');
                string   clientPhineNumber = details[0];
                string   clientNumber      = details[1];
                string   clientType        = details[2];
                string   clientUsername    = "";

                if (clientType == "individual")
                {
                    List <individualClient> indiUserDetail = vl.getUserDetails(clientNumber, clientType);
                    foreach (var item in indiUserDetail)
                    {
                        clientUsername = item.Username;
                    }
                }
                else
                {
                    List <BusinessClient> busiUserDetail = vl.getUserDetails(clientNumber, clientType);
                    foreach (var item in busiUserDetail)
                    {
                        clientUsername = item.Username;
                    }
                }
                //Initiate call
                this.Hide();
                phone_call pc = new phone_call("adminstrators", clientNumber, clientUsername, clientPhineNumber, clientType);
                pc.Show();
            }
            else
            {
                MessageBox.Show(res);
            }
        }