예제 #1
0
        private void BtnSeguimiento_Click(object sender, EventArgs e)
        {
            LollipopButton btnSeguimiento = sender as LollipopButton;

            axWindowsMediaPlayer1.Ctlcontrols.stop();

            txbFolioLlamada.Text        = btnSeguimiento.Name;
            cbTipoLlamada.SelectedIndex = cbTipoLlamada.FindStringExact(btnSeguimiento.Tag.ToString());
            cbTipoLlamada.Enabled       = false;
            btnNuevoTipoLlamada.Enabled = false;
            btnRegistrar.Visible        = false;
            btnGuardaHistorial.Location = new Point(btnRegistrar.Location.X, btnRegistrar.Location.Y);  //new Point(756, 264);
            btnGuardaHistorial.Visible  = true;

            scFoliosAbiertos.Visible = false;
            gbLlamada.Visible        = true;
        }
예제 #2
0
        private void BtnSeguimiento_Click(object sender, EventArgs e)
        {
            LollipopButton btnSeguimiento = sender as LollipopButton;

            StopPlayer();

            lblFolio.Text = btnSeguimiento.Name;
            cbTipoLlamada.SelectedIndex = cbTipoLlamada.FindStringExact(btnSeguimiento.Tag.ToString());
            cbTipoLlamada.Enabled       = false;
            btnNuevoTipoLlamada.Enabled = false;
            lnkGuardarLlamada.Visible   = false;
            btnGuardaHistorial.Location = new Point(lnkGuardarLlamada.Location.X, lnkGuardarLlamada.Location.Y);
            btnGuardaHistorial.Visible  = true;

            scFoliosAbiertos.Visible = false;
            btnAsignarFolio.Visible  = false;

            pnlComentarioFolio.Visible = true;
        }
예제 #3
0
        private void BtnFolio_Click(object sender, EventArgs e)
        {
            Button btnFolio = sender as Button;

            StopPlayer();
            scFoliosAbiertos.Panel2.Controls.Clear();

            Caso caso = new Caso().InformacionCaso(int.Parse(btnFolio.Name));

            Panel pnlTitulo = new Panel();

            pnlTitulo.Height    = 2;
            pnlTitulo.Dock      = DockStyle.Top;
            pnlTitulo.BackColor = Color.FromArgb(174, 213, 129);

            PictureBox pctInfo = new PictureBox();

            pctInfo.BackgroundImage       = Properties.Resources.info_25px;
            pctInfo.Location              = new Point(30, 17);
            pctInfo.BackgroundImageLayout = ImageLayout.None;
            pctInfo.Height = 26;
            pctInfo.Width  = 26;

            Label lblTitulo = new Label();

            lblTitulo.Text      = "Detalles Folio " + caso.iIdCaso;
            lblTitulo.Location  = new Point(53, 18);             //29, 8
            lblTitulo.Font      = new Font("Calibri Light", 14); //122,23
            lblTitulo.Anchor    = AnchorStyles.Left | AnchorStyles.Top;
            lblTitulo.TextAlign = ContentAlignment.TopLeft;
            lblTitulo.Width     = 220;
            lblTitulo.ForeColor = Color.FromArgb(7, 22, 127);

            Label lblMotivo = new Label();

            lblMotivo.Text      = string.Format("Tipo de Llamada{0}{1}", Environment.NewLine, caso.sMotivo);
            lblMotivo.Location  = new Point(30, 55);             //480, 8
            lblMotivo.Font      = new Font("Calibri Light", 13); //122,23
            lblMotivo.Anchor    = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left;
            lblMotivo.TextAlign = ContentAlignment.TopLeft;
            lblMotivo.Width     = 150;
            lblMotivo.Height    = 45;

            Label lblFechaCreacion = new Label();

            lblFechaCreacion.Text      = string.Format("Fecha Solicitud{0}{1}", Environment.NewLine, caso.dtFechaCreacion);
            lblFechaCreacion.Location  = new Point(570, 55);            //30, 44 657, 55
            lblFechaCreacion.Font      = new Font("Calibri Light", 12); //122,23
            lblFechaCreacion.Anchor    = AnchorStyles.Left | AnchorStyles.Top;
            lblFechaCreacion.TextAlign = ContentAlignment.TopLeft;
            lblFechaCreacion.Width     = 220;
            lblFechaCreacion.Height    = 45;

            Label lblContador = new Label();

            lblContador.Text      = string.Format("Contador{0}{1} {2} {3}", Environment.NewLine, caso.sContadorNombre, caso.sContadorAPaterno, caso.sContadorAMaterno);
            lblContador.Location  = new Point(260, 55);            //29, 8
            lblContador.Font      = new Font("Calibri Light", 13); //122,23
            lblContador.Anchor    = AnchorStyles.Left | AnchorStyles.Top;
            lblContador.TextAlign = ContentAlignment.TopLeft;
            lblContador.Width     = 320;
            lblContador.Height    = 45;

            LollipopTextBox txtComentario = new LollipopTextBox();

            txtComentario.Multiline    = true;
            txtComentario.Text         = string.Format("Comentario{0}{1}", Environment.NewLine, caso.sDescripcion);
            txtComentario.Location     = new Point(33, 120);            //29, 8
            txtComentario.Font         = new Font("Calibri Light", 13); //122,23
            txtComentario.Width        = 750;                           //845
            txtComentario.Height       = 65;
            txtComentario.Anchor       = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            txtComentario.FocusedColor = "#FFA300";
            txtComentario.ReadOnly     = true;


            SplitContainer sCHistorial = new SplitContainer();

            sCHistorial.Location         = new Point(30, 200); //162
            sCHistorial.Width            = 385;                //450
            sCHistorial.Height           = 120;                //120
            sCHistorial.Anchor           = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
            sCHistorial.BackColor        = Color.FromArgb(227, 227, 227);
            sCHistorial.Panel1.BackColor = Color.FromArgb(236, 240, 241);   // Color.White;
            sCHistorial.Panel2.BackColor = Color.White;
            sCHistorial.SplitterWidth    = 1;
            sCHistorial.SplitterDistance = 180;


            //CONTROL SPLITCONTAINER DONDE SE MOSTRARAN LAS GRABACIONES
            SplitContainer sCGrabaciones = new SplitContainer();

            sCGrabaciones.Name             = "sCGrabaciones";
            sCGrabaciones.Location         = new Point(430, 200); //490, 200
            sCGrabaciones.Width            = 385;                 //385
            sCGrabaciones.Height           = 120;                 //94
            sCGrabaciones.Anchor           = AnchorStyles.Right | AnchorStyles.Bottom;
            sCGrabaciones.BackColor        = Color.FromArgb(236, 240, 241);
            sCGrabaciones.Panel1.BackColor = Color.FromArgb(236, 240, 241);
            sCGrabaciones.Panel2.BackColor = Color.White;
            sCGrabaciones.SplitterWidth    = 2;
            sCGrabaciones.SplitterDistance = 180; //170



            CasoHistorial casoHistorial = new CasoHistorial();

            LCasoHistorial = casoHistorial.GetListCasoHistorial(caso.iIdCaso);
            for (int i = 0; i < LCasoHistorial.Count; i++)
            {
                Button btnHistorial = new Button();
                btnHistorial.Location  = new Point(0, 24 * i + 0);                 //new Point(12, 24 * i + 0);
                btnHistorial.Name      = LCasoHistorial[i].iIdCasoHistorial.ToString();
                btnHistorial.Text      = "  " + LCasoHistorial[i].dtFechaCreacion.ToString();
                btnHistorial.Font      = new Font("Segoe UI", 9);
                btnHistorial.ForeColor = Color.FromArgb(105, 105, 105);
                btnHistorial.Width     = 180;                 //225//160
                btnHistorial.Height    = 24;
                btnHistorial.FlatStyle = FlatStyle.Flat;
                btnHistorial.FlatAppearance.BorderSize = 0;
                btnHistorial.Anchor            = AnchorStyles.Left | AnchorStyles.Right;
                btnHistorial.TextAlign         = ContentAlignment.MiddleLeft;
                btnHistorial.Cursor            = Cursors.Hand;
                btnHistorial.Image             = Properties.Resources.clock_16px1;
                btnHistorial.ImageAlign        = ContentAlignment.TopLeft;
                btnHistorial.TextImageRelation = TextImageRelation.ImageBeforeText;

                btnHistorial.Click += (s, ev) =>
                {
                    sCHistorial.Panel2.Controls.Clear();
                    CasoHistorial casoH             = new CasoHistorial().GetInfoCasoHistorial(int.Parse(btnHistorial.Name));
                    Label         lblFechaCreacionH = new Label();
                    lblFechaCreacionH.Width    = 200;
                    lblFechaCreacionH.Height   = 45;
                    lblFechaCreacionH.Location = new Point(10, 5);
                    lblFechaCreacionH.Text     = string.Format("Por: {0}{1}Fecha {2}", casoH.sUsuario, Environment.NewLine, casoH.dtFechaCreacion);

                    RichTextBox txtComentarioH = new RichTextBox();
                    txtComentarioH.Text        = string.Format("Comentario{0}{1}", Environment.NewLine, casoH.sComentario);
                    txtComentarioH.Location    = new Point(10, 65);             //29, 8//10, 35
                    txtComentarioH.Font        = new Font("Calibri Light", 11); //122,23
                    txtComentarioH.Width       = 180;                           //270
                    txtComentarioH.Height      = 58;
                    txtComentarioH.Anchor      = AnchorStyles.Left | AnchorStyles.Right;
                    txtComentarioH.BorderStyle = BorderStyle.None;
                    txtComentarioH.ReadOnly    = true;
                    txtComentarioH.BackColor   = Color.White;

                    sCHistorial.Panel2.Controls.Add(txtComentarioH);
                    sCHistorial.Panel2.Controls.Add(lblFechaCreacionH);
                };

                sCHistorial.Panel1.Controls.Add(btnHistorial);
            }

            //using (new NetworkConnection(PathFolderShared, _NetworkCredential))
            //{
            //OBTIENE UNA LISTA DE ARCHIVOS CON EXTENCIÓN DESDE UN DIRECTORIO Y SE AGREGAN A UNA LISTA
            //DirectoryInfo _DirectoryInfo   = new DirectoryInfo(@"\\192.169.143.34\\MiPyme_Files\\Documentos\\Grabaciones\\");
            DirectoryInfo          _DirectoryInfo = new DirectoryInfo(@"\\192.168.1.34\\Documentos\\" + LogicaCC.ConnectionString.FolderConnection + "\\Documentos\\Grabaciones\\");
            IEnumerable <FileInfo> fileList       = _DirectoryInfo.GetFiles("*.WAV", SearchOption.AllDirectories);

            sCGrabaciones.Panel1.Controls.Clear();
            int g = 0;

            foreach (FileInfo fi in fileList.Where(fi => fi.Name.Contains("Folio-" + caso.iIdCaso + "-")).OrderByDescending(fi => fi.Name))
            {
                g++;
                //BOTON QUE SE GENERA POR CADA ARCHIVO ENCONTRADO DE LA LISTA DE DOCUMENTPS FILTRADOS
                Button btnGrabacion = new Button();
                btnGrabacion.Location  = new Point(0, 24 * g + -23);                     //(0, 24 * g + 0);//0, 24 * g + -23
                btnGrabacion.Name      = fi.FullName;
                btnGrabacion.Text      = " " + fi.Name;
                btnGrabacion.Font      = new Font("Segoe UI", 9);
                btnGrabacion.ForeColor = Color.FromArgb(105, 105, 105);
                btnGrabacion.Width     = 180;                     //225
                btnGrabacion.Height    = 24;
                btnGrabacion.TextAlign = ContentAlignment.MiddleLeft;
                btnGrabacion.Cursor    = Cursors.Hand;
                btnGrabacion.FlatStyle = FlatStyle.Flat;
                btnGrabacion.FlatAppearance.BorderSize = 0;
                btnGrabacion.Image             = Properties.Resources.microphone_16px1;
                btnGrabacion.ImageAlign        = ContentAlignment.TopLeft;
                btnGrabacion.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnGrabacion.AutoEllipsis      = true;

                //EVENTO CLICK DEL BOTON GRANACIÓN
                btnGrabacion.Click += (s, ev) =>
                {
                    StopPlayer();
                    sCGrabaciones.Panel2.Controls.Clear();
                    //TITULO DE LA GRABACIÓN
                    Label lblGrabacion = new Label();
                    lblGrabacion.Location  = new Point(65, 30);
                    lblGrabacion.Text      = "Grabación";
                    lblGrabacion.Font      = new Font("Calibri Light", 10);
                    lblGrabacion.ForeColor = Color.FromArgb(105, 105, 105);

                    //NOMBRE DE LA GRABACIÓN
                    Label lblNombreGrabacion = new Label();
                    lblNombreGrabacion.Location  = new Point(5, 4);
                    lblNombreGrabacion.Text      = fi.Name;
                    lblNombreGrabacion.Font      = new Font("Calibri Light", 10);
                    lblNombreGrabacion.ForeColor = Color.FromArgb(105, 105, 105);
                    lblNombreGrabacion.Width     = 180;
                    lblNombreGrabacion.Height    = 20;

                    //CONTROL LINK PARA REPRODUCIR LAS GRABACIONES
                    Bitmap play_25px = Properties.Resources.play_25px1;
                    Bitmap stop_25px = Properties.Resources.stop_25px1;
                    MetroFramework.Controls.MetroLink lnkPlayer = new MetroFramework.Controls.MetroLink();
                    lnkPlayer.Image     = play_25px;
                    lnkPlayer.Location  = new Point(85, 50);
                    lnkPlayer.ImageSize = 25;
                    lnkPlayer.Width     = 25;
                    lnkPlayer.Height    = 25;
                    lnkPlayer.Cursor    = Cursors.Hand;

                    //CONTROL PARA REPRODUCIR AUDIO
                    AxWindowsMediaPlayer axWindowsMediaPlayer1 = new AxWindowsMediaPlayer();
                    axWindowsMediaPlayer1.Location = new Point(30, 85);    //(30, 85);
                    axWindowsMediaPlayer1.Width    = 140;
                    axWindowsMediaPlayer1.Height   = 50;

                    axWindowsMediaPlayer1.PlayStateChange += (object senderr, _WMPOCXEvents_PlayStateChangeEvent es) =>
                    {
                        if (es.newState == 8)
                        {
                            lnkPlayer.Image = play_25px;
                            lnkPlayer.Refresh();
                        }
                    };

                    Panel pnl1 = new Panel();
                    pnl1.BackColor = Color.White;
                    pnl1.Location  = new Point(30, 83);
                    pnl1.Width     = 140;
                    pnl1.Height    = 10;

                    Panel pnl2 = new Panel();
                    pnl2.BackColor = Color.White;
                    pnl2.Location  = new Point(30, 103);
                    pnl2.Width     = 140;
                    pnl2.Height    = 34;

                    Panel pnl3 = new Panel();
                    pnl3.BackColor = Color.White;
                    pnl3.Location  = new Point(30, 83);
                    pnl3.Width     = 28;
                    pnl3.Height    = 50;

                    Panel pnl4 = new Panel();
                    pnl4.BackColor = Color.White;
                    pnl4.Location  = new Point(142, 83);
                    pnl4.Width     = 28;
                    pnl4.Height    = 50;

                    //EVENTO CLICK DEL CONTROL METROLINK
                    lnkPlayer.Click += (se, eva) =>
                    {
                        string path = btnGrabacion.Name;

                        axWindowsMediaPlayer1.URL = path;

                        if (lnkPlayer.Image == play_25px)
                        {
                            lnkPlayer.Image = stop_25px;
                            axWindowsMediaPlayer1.Ctlcontrols.play();
                        }
                        else
                        {
                            lnkPlayer.Image = play_25px;
                            axWindowsMediaPlayer1.Ctlcontrols.stop();
                        }
                    };
                    sCGrabaciones.Panel2.Controls.Add(lnkPlayer);
                    sCGrabaciones.Panel2.Controls.Add(lblNombreGrabacion);
                    sCGrabaciones.Panel2.Controls.Add(lblGrabacion);
                    sCGrabaciones.Panel2.Controls.Add(pnl1);
                    sCGrabaciones.Panel2.Controls.Add(pnl2);
                    sCGrabaciones.Panel2.Controls.Add(pnl3);
                    sCGrabaciones.Panel2.Controls.Add(pnl4);
                    sCGrabaciones.Panel2.Controls.Add(axWindowsMediaPlayer1);
                };
                sCGrabaciones.Panel1.Controls.Add(btnGrabacion);
            }
            //}

            LollipopButton btnSeguimiento = new LollipopButton();

            btnSeguimiento.Location = new Point(620, 18);
            btnSeguimiento.Name     = caso.iIdCaso.ToString();
            btnSeguimiento.Text     = "Dar Seguimiento";
            btnSeguimiento.Width    = 126;
            btnSeguimiento.Height   = 24;
            btnSeguimiento.Anchor   = AnchorStyles.Right | AnchorStyles.Top;
            btnSeguimiento.Cursor   = Cursors.Hand;
            btnSeguimiento.Tag      = caso.sMotivo;
            btnSeguimiento.BGColor  = "#2196F3";
            btnSeguimiento.Click   += BtnSeguimiento_Click;

            //AGREGAMOS LOS CONTROLES AL PANEL 2
            scFoliosAbiertos.Panel2.Controls.Add(pnlTitulo);
            scFoliosAbiertos.Panel2.Controls.Add(pctInfo);
            scFoliosAbiertos.Panel2.Controls.Add(lblTitulo);
            scFoliosAbiertos.Panel2.Controls.Add(lblMotivo);
            scFoliosAbiertos.Panel2.Controls.Add(lblFechaCreacion);
            scFoliosAbiertos.Panel2.Controls.Add(lblContador);
            scFoliosAbiertos.Panel2.Controls.Add(txtComentario);
            scFoliosAbiertos.Panel2.Controls.Add(sCHistorial);
            scFoliosAbiertos.Panel2.Controls.Add(sCGrabaciones);
            scFoliosAbiertos.Panel2.Controls.Add(btnSeguimiento);
        }
예제 #4
0
        private void BtnFolio_Click(object sender, EventArgs e)
        {
            Button btnFolio = sender as Button;

            axWindowsMediaPlayer1.Ctlcontrols.stop();
            RestartControlls(true);
            LlenarListView();

            Caso caso = new Caso().InformacionCaso(int.Parse(btnFolio.Name));

            lblTitulo.Text        = string.Format("Detalles Folio {0}", caso.iIdCaso);
            lblMotivo.Text        = string.Format("Tipo de Llamada{0}{1}", Environment.NewLine, caso.sMotivo);
            lblContador.Text      = string.Format("Contador{0}{1} {2} {3}", Environment.NewLine, caso.sContadorNombre, caso.sContadorAPaterno, caso.sContadorAMaterno);
            txtComentario.Text    = string.Format("Comentario{0}{1}", Environment.NewLine, caso.sDescripcion);
            lblFechaCreacion.Text = string.Format("Fecha Solicitud{0}{1}", Environment.NewLine, caso.dtFechaCreacion);

            CasoHistorial casoHistorial = new CasoHistorial();

            LCasoHistorial = casoHistorial.GetListCasoHistorial(caso.iIdCaso);
            for (int i = 0; i < LCasoHistorial.Count; i++)
            {
                Button btnHistorial = new Button();
                btnHistorial.Location                  = new Point(0, 24 * i + 0);//new Point(12, 24 * i + 0);
                btnHistorial.Name                      = LCasoHistorial[i].iIdCasoHistorial.ToString();
                btnHistorial.Text                      = "  " + LCasoHistorial[i].dtFechaCreacion.ToString();
                btnHistorial.Font                      = new Font("Segoe UI", 9);
                btnHistorial.ForeColor                 = Color.FromArgb(105, 105, 105);
                btnHistorial.Width                     = 180;    //225//160
                btnHistorial.Height                    = 24;
                btnHistorial.FlatStyle                 = FlatStyle.Flat;
                btnHistorial.Anchor                    = AnchorStyles.Left | AnchorStyles.Right;
                btnHistorial.TextAlign                 = ContentAlignment.MiddleLeft;
                btnHistorial.Cursor                    = Cursors.Hand;
                btnHistorial.Image                     = Properties.Resources.clock_16px1;
                btnHistorial.ImageAlign                = ContentAlignment.TopLeft;
                btnHistorial.TextImageRelation         = TextImageRelation.ImageBeforeText;
                btnHistorial.FlatAppearance.BorderSize = 0;

                btnHistorial.Click += (s, ev) =>
                {
                    sCHistorial.Panel2.Controls.Clear();
                    CasoHistorial casoH             = new CasoHistorial().GetInfoCasoHistorial(int.Parse(btnHistorial.Name));
                    Label         lblFechaCreacionH = new Label();
                    lblFechaCreacionH.Width    = 200;
                    lblFechaCreacionH.Height   = 45;
                    lblFechaCreacionH.Location = new Point(10, 5);
                    lblFechaCreacionH.Text     = "Por: " + casoH.sUsuario + Environment.NewLine + "Fecha " + casoH.dtFechaCreacion;
                    lblFechaCreacionH.Font     = new Font("Calibri Light", 11);

                    RichTextBox txtComentarioH = new RichTextBox();
                    txtComentarioH.Text        = "Comentario" + Environment.NewLine + casoH.sComentario;
                    txtComentarioH.Location    = new Point(10, 65);             //29, 8//10, 35
                    txtComentarioH.Font        = new Font("Calibri Light", 11); //122,23
                    txtComentarioH.Width       = 180;                           //270
                    txtComentarioH.Height      = 58;
                    txtComentarioH.Anchor      = AnchorStyles.Left | AnchorStyles.Right;
                    txtComentarioH.BorderStyle = BorderStyle.None;
                    txtComentarioH.ReadOnly    = true;
                    txtComentarioH.BackColor   = Color.White;

                    sCHistorial.Panel2.Controls.Add(txtComentarioH);
                    sCHistorial.Panel2.Controls.Add(lblFechaCreacionH);
                };

                sCHistorial.Panel1.Controls.Add(btnHistorial);
            }

            List <String> fileList = EndFTPRead();

            sCGrabaciones.Panel1.Controls.Clear();
            int g = 0;

            foreach (var fi in fileList.Where(fi => fi.Contains("Folio-" + caso.iIdCaso + "-")).OrderByDescending(fi => fi))
            {
                g++;
                //BOTON QUE SE GENERA POR CADA ARCHIVO ENCONTRADO DE LA LISTA DE DOCUMENTPS FILTRADOS
                Button btnGrabacion = new Button();
                btnGrabacion.Location  = new Point(0, 24 * g + -23); //(0, 24 * g + 0);//0, 24 * g + -23
                btnGrabacion.Name      = fi;
                btnGrabacion.Text      = " " + fi;
                btnGrabacion.Font      = new Font("Segoe UI", 9);
                btnGrabacion.ForeColor = Color.FromArgb(105, 105, 105);
                btnGrabacion.Width     = 180; //225
                btnGrabacion.Height    = 24;
                btnGrabacion.TextAlign = ContentAlignment.MiddleLeft;
                btnGrabacion.Cursor    = Cursors.Hand;
                btnGrabacion.FlatStyle = FlatStyle.Flat;
                btnGrabacion.FlatAppearance.BorderSize = 0;
                btnGrabacion.Image             = Properties.Resources.microphone_16px1;
                btnGrabacion.ImageAlign        = ContentAlignment.TopLeft;
                btnGrabacion.TextImageRelation = TextImageRelation.ImageBeforeText;
                btnGrabacion.AutoEllipsis      = true;
                btnGrabacion.Click            += BtnGrabacion_Click;

                sCGrabaciones.Panel1.Controls.Add(btnGrabacion);
            }

            LollipopButton btnSeguimiento = new LollipopButton();

            btnSeguimiento.Location = new Point(745, 18);
            btnSeguimiento.Name     = caso.iIdCaso.ToString();
            btnSeguimiento.Text     = "Dar Seguimiento";
            btnSeguimiento.Width    = 130;//160
            btnSeguimiento.Height   = 30;
            btnSeguimiento.Anchor   = AnchorStyles.Right | AnchorStyles.Top;
            btnSeguimiento.Cursor   = Cursors.Hand;
            btnSeguimiento.Tag      = caso.sMotivo;
            btnSeguimiento.BGColor  = "#001489";
            btnSeguimiento.Click   += BtnSeguimiento_Click;
        }