Beispiel #1
0
        //연결성립2
        private void axLGUBaseOpenApi2_SendChannelListEvent(object sender, AxLGUBASEOPENAPILib._DLGUBaseOpenApiEvents_SendChannelListEventEvent e)
        {
            this.calling2 = true;
            this.missed2  = false;

            string str  = e.bstrChannelList.ToString();
            string str1 = "";
            string str2 = "";
            string str3 = "";

            if (this.ptype.Equals("DCS"))
            {
                string[] strArrays = str.Split(new char[] { '|' });
                //MessageBox.Show(e.bstrChannelList.ToString());
                for (int i = 0; i < (int)strArrays.Length; i++)
                {
                    if (strArrays[i].StartsWith("CALLER1"))
                    {
                        //전화를 건 사람
                        str1 = strArrays[i].Replace("CALLER1ID:", "");
                    }
                    else if (strArrays[i].StartsWith("CALLER2"))
                    {
                        //2차수신자
                        str2 = strArrays[i].Replace("CALLER2ID:", "");
                    }
                    else if (strArrays[i].StartsWith("INEXTEN"))
                    {
                        //1차수신자 - chnnel
                        str3 = strArrays[i].Replace("INEXTEN:", "");
                    }
                }

                if (!str2.Equals("") && str2.Length > 4)
                {
                    str2 = str2.Substring(str2.Length - 4, 4);
                }

                if (!str3.Equals("") && str3.Length > 4)
                {
                    str3 = str3.Substring(str3.Length - 4, 4);
                }

                if (!this.dial2.Equals("0") && !this.dial2.Equals(""))
                {
                    str3 = str1;
                    str1 = this.param1;
                    //c1_tel1, string ch, string to,
                    this.insertCallLog(str1, str3, str2, this.callcenter_idx, "전화걸기", this.dial2);
                }
                //str3 = str3.Substring(str3.Length - 4, str3.Length);
                else if (str3.Equals(str2))
                {
                    this.insertCallLog(str1, str3, "", this.callcenter_idx, "바로받기", this.dial2);
                }
                else if (!str2.Equals("") && !str2.Equals(str3))
                {
                    this.insertCallLog(str1, str3, str2, this.callcenter_idx, "당겨받기", this.dial2);
                }


                if (!str1.StartsWith("16445821") && !str1.StartsWith("07050"))
                {
                    if (this.line_count != 1)
                    {
                        FormBegin.form = new FormReceipt(this.param1, this.param2, this, str1, this.id, str2, str3, "", "new", this.callcenter_idx);
                    }
                    else
                    {
                        FormBegin.form = new FormReceipt(this.param1, "", this, str1, this.id, str2, str3, "", "new", this.callcenter_idx);
                    }
                    FormBegin.form.Show();
                }
            }
            else if (this.ptype.Equals("CENTRIX"))
            {
                string[] strArrays1 = str.Split(new char[] { '|' });
                for (int j = 0; j < (int)strArrays1.Length; j++)
                {
                    if (strArrays1[j].StartsWith("CALLER1"))
                    {
                        str1 = strArrays1[j].Replace("CALLER1ID:", "");
                    }
                    else if (strArrays1[j].StartsWith("CALLER2"))
                    {
                        str2 = strArrays1[j].Replace("CALLER2ID:", "");
                    }
                    else if (strArrays1[j].StartsWith("INEXTEN"))
                    {
                        str3 = strArrays1[j].Replace("INEXTEN:", "");
                    }
                }
                if (this.dial2.Equals("0") || this.dial2.Equals(""))
                {
                    if (str3.Equals(str2))
                    {
                        this.insertCallLog(str1, str3, "", this.callcenter_idx, "바로받기", this.dial2);
                    }
                    else if (!str2.Equals("") && !str2.Equals(str3))
                    {
                        this.insertCallLog(str1, str3, str2, this.callcenter_idx, "당겨받기", this.dial2);
                    }
                    if (!str1.StartsWith("16445821") && !str1.StartsWith("07050"))
                    {
                        if (this.line_count != 1)
                        {
                            FormBegin.form = new FormReceipt(this.param1, this.param2, this, str1, this.id, str2, str3, "", "new", this.callcenter_idx);
                        }
                        else
                        {
                            FormBegin.form = new FormReceipt(this.param1, "", this, str1, this.id, str2, str3, "", "new", this.callcenter_idx);
                        }
                        FormBegin.form.Show();
                    }
                }
                else
                {
                    str3 = str1;
                    str1 = this.param1;
                    this.insertCallLog(str1, str3, str2, this.callcenter_idx, "전화걸기", this.dial2);
                }
            }
        }
Beispiel #2
0
        //연결성립1
        private void axLGUBaseOpenApi1_SendChannelListEvent(object sender, AxLGUBASEOPENAPILib._DLGUBaseOpenApiEvents_SendChannelListEventEvent e)
        {
            this.calling1 = true;
            this.missed1  = false;

            if (this.ptype.Equals("DCS"))
            {
                string[] strArrays = e.bstrChannelList.ToString().Split(new char[] { '|' });
                string   str       = "";
                string   str1      = "";
                string   str2      = "";

                //MessageBox.Show(e.bstrChannelList.ToString());
                for (int i = 0; i < (int)strArrays.Length; i++)
                {
                    if (strArrays[i].StartsWith("CALLER1"))
                    {
                        //전화를 건 사람
                        str = strArrays[i].Replace("CALLER1ID:", "");
                    }
                    else if (strArrays[i].StartsWith("CALLER2"))
                    {
                        //당겨받는 사람 - 2차 수신자
                        str1 = strArrays[i].Replace("CALLER2ID:", "");
                    }
                    else if (strArrays[i].StartsWith("INEXTEN"))
                    {
                        //1차수신자
                        str2 = strArrays[i].Replace("INEXTEN:", "");
                    }
                }
                //MessageBox.Show("다음1 this.dial1 ="+ this.dial1);

                if (!str2.Equals("") && str2.Length > 4)
                {
                    str2 = str2.Substring(str2.Length - 4, 4);
                }

                if (!str1.Equals("") && str1.Length > 4)
                {
                    str1 = str1.Substring(str1.Length - 4, 4);
                }

                //insert
                if (!this.dial1.Equals("0") && !this.dial1.Equals(""))
                {
                    str2 = str;
                    str  = this.param1;
                    this.insertCallLog(str, str2, str1, this.callcenter_idx, "전화걸기", this.dial1);
                    //MessageBox.Show("전화걸기 = ");
                }
                else if (str2.Equals(str1))
                {
                    this.insertCallLog(str, str2, "", this.callcenter_idx, "바로받기", this.dial1);
                    //MessageBox.Show("바로받기 = ");
                }
                else if (!str1.Equals("") && !str1.Equals(str2))
                {
                    this.insertCallLog(str, str2, str1, this.callcenter_idx, "당겨받기", this.dial1);
                    //MessageBox.Show("당겨받기 /  전화건사람=" + str +"  2차 수신자 ="+str1 + "  1차 수신자 =" + str2);
                }

                //MessageBox.Show("전화건사람 = " + str + " 1차수신자 = " + str2 + " 2차수신자 = " + str1);
                if (!str.StartsWith("16445821") && !str.StartsWith("07050"))
                {
                    if (this.line_count != 1)
                    {
                        FormBegin.form = new FormReceipt(this.param1, this.param2, this, str, this.id, str1, str2, "", "new", this.callcenter_idx);
                    }
                    else
                    {
                        FormBegin.form = new FormReceipt(this.param1, "", this, str, this.id, str1, str2, "", "new", this.callcenter_idx);
                    }
                    FormBegin.form.Show();
                }
            }
            else if (this.ptype.Equals("CENTRIX"))
            {
                string[] strArrays1 = e.bstrChannelList.ToString().Split(new char[] { '|' });
                string   str3       = "";
                string   str4       = "";
                string   str5       = "";
                for (int j = 0; j < (int)strArrays1.Length; j++)
                {
                    if (strArrays1[j].StartsWith("CALLER1"))
                    {
                        str3 = strArrays1[j].Replace("CALLER1ID:", "");
                    }
                    else if (strArrays1[j].StartsWith("CALLER2"))
                    {
                        str4 = strArrays1[j].Replace("CALLER2ID:", "");
                    }
                    else if (strArrays1[j].StartsWith("INEXTEN"))
                    {
                        str5 = strArrays1[j].Replace("INEXTEN:", "");
                    }
                }

                if (this.dial1.Equals("0") || this.dial1.Equals(""))
                {
                    if (str5.Equals(str4))
                    {
                        this.insertCallLog(str3, str5, "", this.callcenter_idx, "바로받기", this.dial1);
                    }
                    else if (!str4.Equals("") && !str4.Equals(str5))
                    {
                        this.insertCallLog(str3, str5, str4, this.callcenter_idx, "당겨받기", this.dial1);
                    }

                    if (!str3.StartsWith("16445821") && !str3.StartsWith("07050"))
                    {
                        if (this.line_count != 1)
                        {
                            FormBegin.form = new FormReceipt(this.param1, this.param2, this, str3, this.id, str4, str5, "", "new", this.callcenter_idx);
                        }
                        else
                        {
                            FormBegin.form = new FormReceipt(this.param1, "", this, str3, this.id, str4, str5, "", "new", this.callcenter_idx);
                        }
                        FormBegin.form.Show();
                    }
                }
                else
                {
                    str5 = str3;
                    str3 = this.param1;
                    this.insertCallLog(str3, str5, str4, this.callcenter_idx, "전화걸기", this.dial1);
                }
            }
        }