Exemple #1
0
        void LnkAgendaLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (dgvAcoes.Rows.Count == 0)
            {
                return;
            }
            int    i      = dgvAcoes.CurrentRow.Index;
            string codigo = dgvAcoes.Rows[i].Cells[0].Value.ToString();

            string[] args = new string[5];
            args[0] = Globais.sUsuario;
            args[1] = Globais.sFilial;
            args[2] = Globais.bAdministrador ? "S" : "N";
            args[3] = cliente;
            args[4] = codigo;
            trace.grava("agendamento link");
            frmAgenda frm = new frmAgenda(args);

            frm.ShowDialog();

            i = dgvContatos.CurrentRow.Index;
            string contato = dgvContatos.Rows[i].Cells["CodContato"].Value.ToString();

            CarregaHistorico(cliente, contato, int.Parse(codigo));
        }
Exemple #2
0
        void DgvHistoricoMouseDoubleClick(object sender, MouseEventArgs e)
        {
            DataGridView.HitTestInfo hti = dgvHistorico.HitTest(e.X, e.Y);
            if (hti.RowIndex == -1)
            {
                return;
            }
            int    i      = hti.RowIndex;
            int    j      = dgvAcoes.CurrentRow.Index;
            string codigo = dgvAcoes.Rows[j].Cells[0].Value.ToString();

            string[] args = new string[6];
            args[0] = Globais.sUsuario;
            args[1] = Globais.sFilial;
            args[2] = Globais.bAdministrador ? "S" : "N";
            string   usuario = dgvHistorico.Rows[i].Cells["CodUsuario"].Value.ToString().Trim();
            DateTime data    = DateTime.Parse(dgvHistorico.Rows[i].Cells["Agendamento"].Value.ToString());

            args[3] = usuario;
            args[4] = data.ToString().Trim();
            args[5] = codigo;
            trace.grava("agendamento duplo click");
            frmAgenda frm = new frmAgenda(args);

            frm.ShowDialog();

            i = dgvContatos.CurrentRow.Index;
            string contato = dgvContatos.Rows[i].Cells["CodContato"].Value.ToString();

            CarregaHistorico(cliente, contato, int.Parse(codigo));
        }
Exemple #3
0
        private void mnuAgenda_Click(object sender, EventArgs e)
        {
            //abre o formulário agenda
            //utilizando formulário MDI
            Form frmAgenda = new frmAgenda();

            frmAgenda.MdiParent = this;
            frmAgenda.Show();
        }
Exemple #4
0
        void DgvHistoricoMouseDoubleClick(object sender, MouseEventArgs e)
        {
            DataGridView.HitTestInfo hti = dgvHistorico.HitTest(e.X, e.Y);
            if (hti.RowIndex == -1)
            {
                return;
            }
            int i = hti.RowIndex;

            string[] args = new string[6];
            args[0] = Globais.sUsuario;
            args[1] = Globais.sFilial;
            args[2] = Globais.bAdministrador ? "S" : "N";
            string   usuario = dgvHistorico.Rows[i].Cells["CodUsuario"].Value.ToString().Trim();
            DateTime data    = DateTime.Parse(dgvHistorico.Rows[i].Cells["Agendamento"].Value.ToString());

            args[3] = usuario;
            args[4] = data.ToString().Trim();
            args[5] = "999999";
            frmAgenda frm = new frmAgenda(args);

            frm.ShowDialog();
            //CarregaHistorico();
        }