Example #1
0
        public FormReceipt(string param1, string param2, FormBegin formBegin, string caller, string id, string ch, string to, string order_no, string old_new, string callcenter_idx)
            : this(param1, param2, formBegin, caller, id, ch, to, order_no, old_new)
        {
            this.callcenter_idx = callcenter_idx;
            if (old_new.Equals("old"))
            {
                ///order/updateOrderPop.do?order_no=
                //chromeBrowser = new ChromiumWebBrowser("http://127.0.0.1:8080/corp/updateOrderPop.do?order_no=" + order_no + "&c1_tel1=" + caller);
                chromeBrowser = new ChromiumWebBrowser("https://daemuri.net/order/updateOrderPop.do?order_no=" + order_no + "&c1_tel1=" + caller);

                chromeBrowser.LoadingStateChanged += OnLoadingStateChanged;
                Controls.Add(chromeBrowser);
                chromeBrowser.Dock = DockStyle.Fill;
            }
            else if (old_new.Equals("new"))
            {
                ///order/insertOrderPop.do
                //chromeBrowser = new ChromiumWebBrowser("http://127.0.0.1:8080/corp/insertOrderPop.do?c1_tel1=" +
                chromeBrowser = new ChromiumWebBrowser("https://daemuri.net/order/insertOrderPop.do?c1_tel1=" +
                                                       caller + "&id=" + id + "&ch=" + ch + "&end=" + to + "&callcenter_idx=" + callcenter_idx + "&page=0");

                chromeBrowser.LoadingStateChanged += OnLoadingStateChanged;
                Controls.Add(chromeBrowser);
                chromeBrowser.Dock = DockStyle.Fill;
            }
        }
Example #2
0
        public void cidClient(String callcenter_idx, FormBegin begin)
        {
            this.callcenter_idx = callcenter_idx;
            this.begin          = begin;

            int port = 54321;

            try
            {
                // get user input and transmit it to server


                socket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                System.Net.IPAddress ipAdd = System.Net.IPAddress.Parse("110.10.189.101");
                //System.Net.IPAddress ipAdd = System.Net.IPAddress.Parse("127.0.0.1");
                System.Net.IPEndPoint remoteEP = new System.Net.IPEndPoint(ipAdd, 54321);

                socket.Connect(remoteEP);
                //Async Read form the server side
                Receive(socket);
                socket.Send(encoding.GetBytes("start_begin_callcenter:" + callcenter_idx));

                byte[] Serbyte = new byte[30];
            }
            catch (System.IO.IOException e)
            {
                System.Console.Out.WriteLine(e);
            }
        }
Example #3
0
        /*public FormReceipt(string param1,  FormBegin formBegin, string caller, string id, string ch, string to)
         * {
         *  InitializeComponent();
         * }
         */

        public FormReceipt(string param1, string param2, FormBegin formBegin, string caller, string id, string ch, string to, string order_no, string old_new)
        {
            InitializeComponent();
            this.param1    = param1;
            this.param2    = param2;
            this.formBegin = formBegin;
            this.caller    = caller;
            this.id        = id;
            this.ch        = ch;
            this.to        = to;
            this.order_no  = order_no;
            this.old_new   = old_new;
        }
Example #4
0
        public void screenView()
        {
            formBegin = this;

            /*Rectangle screen = Screen.PrimaryScreen.WorkingArea;
             * int w = screen.Width;
             * this.Size = new Size(w, 200);
             * //작업영역을 알아오는 Flag
             * int SPI_GETWORKAREA = 0x0030;
             * RECT r = new RECT();
             * SystemParametersInfo(SPI_GETWORKAREA, 0, out r, 0);
             * Size s = this.Size;
             * Point p = new Point(r.right - s.Width, r.bottom - s.Height);
             *
             * this.StartPosition = FormStartPosition.Manual;
             * this.Location = p;
             */


            this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;

            timer.Tick += new EventHandler(timer_Tick);

            Rectangle screen = Screen.PrimaryScreen.WorkingArea;
            int       w      = screen.Width;
            int       h      = screen.Height;

            this.Size = new Size(w, h);
            //작업영역을 알아오는 Flag
            int  SPI_GETWORKAREA = 0x0030;
            RECT r = new RECT();

            SystemParametersInfo(SPI_GETWORKAREA, 0, out r, 0);
            Size  s = this.Size;
            Point p = new Point(r.right - s.Width, r.bottom - s.Height);

            this.StartPosition = FormStartPosition.Manual;
            this.Location      = p;

            string url = "https://daemuri.net/main/getMemberCheck.do?id=" + id + "&pwd=" + pwd + "&ip=" + ip + "&host=" + host;

            //string url = "http://127.0.0.1:8080/main/getMemberCheck.do?id=" + id + "&pwd=" + pwd + "&ip=" + ip + "&host=" + host;
            chromeBrowser = new ChromiumWebBrowser(url);

            chromeBrowser.LoadingStateChanged += OnLoadingStateChanged;
            Controls.Add(chromeBrowser);
            chromeBrowser.Dock = DockStyle.Fill;
        }
Example #5
0
        private void loginFinal()
        {
            auth = AuthBox.Text.ToString();
            if (AuthBox.Text.ToString().Equals(""))
            {
                AuthBox.Focus();
                MessageBox.Show("인증번호를 입력해 주세요");
            }
            else
            {
                string url = "https://daemuri.net/main/getCheckAuthForLogin.do?id=" + id +
                             //string url = "http://127.0.0.1:8080/main/getCheckAuthForLogin.do?id=" + id +
                             "&pwd=" + pwd +
                             "&cid=" + cid +
                             "&auth=" + auth;
                try
                {
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                    request.Method      = "POST";
                    request.ContentType = "Application/json;charset=utf-8";

                    string sendData = "";

                    byte[] buffer;
                    buffer = Encoding.Default.GetBytes(sendData);
                    request.ContentLength = buffer.Length;
                    Stream sendStream = request.GetRequestStream();
                    sendStream.Write(buffer, 0, buffer.Length);
                    sendStream.Close();
                    HttpWebResponse response       = (HttpWebResponse)request.GetResponse();
                    Stream          respPostStream = response.GetResponseStream();
                    StreamReader    readerPost     = new StreamReader(respPostStream, Encoding.UTF8);
                    string          resultJson     = readerPost.ReadToEnd();

                    if (!resultJson.Contains("<!DOCTYPE html"))
                    {
                        if (resultJson.Equals("1"))
                        {
                            if (R1.Checked)
                            {
                                ptype = "DCS";
                            }
                            else if (R2.Checked)
                            {
                                ptype = "CENTRIX";
                            }

                            //MessageBox.Show("type ="+ ptype  + "  callcenter_idx="+ callcenter_idx);
                            url = "https://daemuri.net/corp/getDn.do?ip=" + GetLocalIP() + "&callcenter_idx=" + callcenter_idx + "&ptype=" + ptype;
                            //url = "http://127.0.0.1:8080/corp/getDn.do?ip=" + GetLocalIP() + "&callcenter_idx=" + callcenter_idx+"&ptype="+ptype;

                            try
                            {
                                request             = (HttpWebRequest)WebRequest.Create(url);
                                request.Method      = "POST";
                                request.ContentType = "Application/json;charset=utf-8";

                                sendData = "";

                                buffer = Encoding.Default.GetBytes(sendData);
                                request.ContentLength = buffer.Length;
                                sendStream            = request.GetRequestStream();
                                sendStream.Write(buffer, 0, buffer.Length);
                                sendStream.Close();
                                response       = (HttpWebResponse)request.GetResponse();
                                respPostStream = response.GetResponseStream();
                                readerPost     = new StreamReader(respPostStream, Encoding.UTF8);
                                resultJson     = readerPost.ReadToEnd();

                                JObject obj = new JObject();
                                obj = JObject.Parse(resultJson);

                                //string id = obj["id"].ToString();
                                string dn1             = obj["dn1"].ToString();
                                string dn2             = obj["dn2"].ToString();
                                string pwd1            = obj["pwd1"].ToString();
                                string pwd2            = obj["pwd2"].ToString();
                                string callcenter_name = obj["callcenter_name"].ToString();

                                string ip   = GetLocalIP();
                                string host = "";
                                id = IDBox.Text.ToString();
                                string pwd = PwdBox.Text.ToString();

                                //MessageBox.Show("dn1 = " + dn1+ "  dn2 = " + dn2+"  ptype="+ptype + " callcenter_idx="+ callcenter_idx);
                                if (id.Equals("0") && dn1.Equals("0"))
                                {
                                    MessageBox.Show("등록된 내선이 없습니다.");
                                }
                                else if (dn2 == null || dn2.Equals("0"))//내선번호 1만 있는경우
                                {
                                    param1 = dn1;

                                    form = new FormBegin(param1, id, pwd, callcenter_idx, pwd1, pwd2, ip, host, ptype, callcenter_name);
                                    this.Hide();
                                    form.Show();
                                }
                                else//내선번호 2도 있는경우
                                {
                                    param1 = dn1;
                                    param2 = dn2;

                                    form = new FormBegin(param1, param2, id, pwd, callcenter_idx, pwd1, pwd2, ip, host, ptype, callcenter_name);
                                    form.Show();
                                    this.Hide();
                                }
                            }
                            catch (System.Net.WebException er)
                            {
                                MessageBox.Show(er.Message);
                            }
                        }
                        else
                        {
                            MessageBox.Show("등록된 사용자가 아닙니다.");
                        }
                    }
                    else
                    {
                        MessageBox.Show("등록된 사용자가 아닙니다.");
                    }
                }
                catch (System.Net.WebException er)
                {
                    MessageBox.Show(er.Message);
                }
            }
        }