Esempio n. 1
0
        private void btnAtenderProgramar_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet             dsBitacoraComercial = new DataSet();
                BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
                {
                    OPCION              = 5,
                    USUARIO             = General.General.GetUsuario,
                    IdBitacoraComercial = Codigo
                };
                new BitacoraComercialBL().ProcesarBitacoraComercial(BitacoraComercialBE);

                IdBitacoraComercialGenerada = Codigo;
                Codigo                             = string.Empty;
                btnAceptar.Enabled                 = true;
                btnAtenderProgramar.Enabled        = false;
                btnAtender.Enabled                 = false;
                cboIdTipoBitacora_tt.SelectedValue = string.Empty;
                dtFechaAlerta.Value                = DateTime.Now;
                txtDescripcion.Clear();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public DataSet ProcesarBitacoraComercial(BitacoraComercialBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("BitacoraComercial_Mnt");
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO);
                db.AddInParameter(cmd, "IdBitacoraComercial", DbType.String, BE.IdBitacoraComercial);
                db.AddInParameter(cmd, "IdSocio", DbType.String, BE.IdSocio);
                db.AddInParameter(cmd, "IdTipoBitacora_tt", DbType.String, BE.IdTipoBitacora_tt);
                db.AddInParameter(cmd, "Descripcion", DbType.String, BE.Descripcion);
                if (BE.FechaAlerta != DateTime.MinValue)
                {
                    db.AddInParameter(cmd, "FechaAlerta", DbType.DateTime, BE.FechaAlerta);
                }
                db.AddInParameter(cmd, "IdEstado_tt", DbType.String, BE.IdEstado_tt);
                if (BE.FechaAtendido != DateTime.MinValue)
                {
                    db.AddInParameter(cmd, "FechaAtendido", DbType.DateTime, BE.FechaAtendido);
                }
                db.AddInParameter(cmd, "IdGestor", DbType.String, BE.IdGestor);
                db.AddInParameter(cmd, "IdBitacoraComercialGenerada", DbType.String, BE.IdBitacoraComercialGenerada);
                db.AddInParameter(cmd, "FlgOrigen", DbType.Int32, BE.FlgOrigen);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }
Esempio n. 3
0
        private void CargarDatos()
        {
            try
            {
                DataSet             dsBitacoraComercial = new DataSet();
                BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
                {
                    OPCION              = 1,
                    USUARIO             = General.General.GetCodigoUsuario,
                    IdBitacoraComercial = Codigo,
                };

                dsBitacoraComercial = BitacoraComercialBL.ProcesarBitacoraComercial(BitacoraComercialBE);

                if (dsBitacoraComercial.Tables[0].Rows.Count > 0)
                {
                    cboIdTipoBitacora_tt.SelectedValue = dsBitacoraComercial.Tables[0].Rows[0]["IdTipoBitacora_tt"].ToString();
                    txtDescripcion.Text = dsBitacoraComercial.Tables[0].Rows[0]["Descripcion"].ToString();
                    dtFechaAlerta.Value = Convert.ToDateTime(dsBitacoraComercial.Tables[0].Rows[0]["FechaAlerta"].ToString());
                }
                else
                {
                    MessageBox.Show("Este .... no Existe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 4
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(_IdSocio))
                {
                    MessageBox.Show("Se debe Ingresar un IdSocio", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (cboIdTipoBitacora_tt.SelectedIndex == -1)
                {
                    MessageBox.Show("Se debe seleccionar un IdTipoBitacora_tt", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (string.IsNullOrEmpty(txtDescripcion.Text))
                {
                    MessageBox.Show("Se debe Ingresar un Descripcion", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (dtFechaAlerta.CustomFormat == " ")
                {
                    MessageBox.Show("Ingrese una fecha de programación.", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
                {
                    USUARIO                     = General.General.GetCodigoUsuario,
                    OPCION                      = 2,
                    IdBitacoraComercial         = Codigo,
                    IdSocio                     = _IdSocio,
                    IdTipoBitacora_tt           = cboIdTipoBitacora_tt.SelectedValue.ToString(),
                    Descripcion                 = txtDescripcion.Text,
                    FechaAlerta                 = dtFechaAlerta.Value,
                    IdGestor                    = _IdGestor,
                    IdBitacoraComercialGenerada = IdBitacoraComercialGenerada,
                    FlgOrigen                   = _FlgOrigen
                };

                DataSet dsBitacoraComercial = new DataSet();
                dsBitacoraComercial = BitacoraComercialBL.ProcesarBitacoraComercial(BitacoraComercialBE);
                MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Dispose();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 5
0
        private void CargarDatos()
        {
            try
            {
                BitacoraComercialBE oEntity = new BitacoraComercialBE();
                oEntity.OPCION  = 1;
                oEntity.USUARIO = General.General.GetUsuario;
                oEntity.IdSocio = Codigo;
                DataSet ds = new BitacoraComercialBL().ProcesarBitacoraComercial(oEntity);

                if (ds.Tables.Count > 0)
                {
                    dgvReporteDetalle.DataSource = ds.Tables[0];
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 6
0
 private void btnAtender_Click(object sender, EventArgs e)
 {
     try
     {
         DataSet             dsBitacoraComercial = new DataSet();
         BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
         {
             OPCION              = 5,
             USUARIO             = General.General.GetUsuario,
             IdBitacoraComercial = Codigo
         };
         new BitacoraComercialBL().ProcesarBitacoraComercial(BitacoraComercialBE);
         MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Dispose();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        public void CargarBitacoraComercial()
        {
            try
            {
                DataSet             dsBitacoraComercial = new DataSet();
                BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
                {
                    OPCION   = 1,
                    USUARIO  = General.General.GetUsuario,
                    IdSocio  = Codigo,
                    IdGestor = _IdGestor,
                };

                dsBitacoraComercial             = new BitacoraComercialBL().ProcesarBitacoraComercial(BitacoraComercialBE);
                dgvBitacoraComercial.DataSource = dsBitacoraComercial.Tables[0];
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void CargarBitacoraComercial()
        {
            try
            {
                DataSet             dsBitacoraComercial = new DataSet();
                BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE()
                {
                    OPCION   = 4,
                    USUARIO  = General.General.GetUsuario,
                    IdSocio  = Codigo,
                    IdGestor = cboEjecutivo.SelectedValue.ToString()
                };

                dsBitacoraComercial             = new BitacoraComercialBL().ProcesarBitacoraComercial(BitacoraComercialBE);
                dgvBitacoraComercial.DataSource = dsBitacoraComercial.Tables[0];
                lblRegistros.Text = dsBitacoraComercial.Tables[0].Rows.Count.ToString() + " registro(s)";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 9
0
 public DataSet ProcesarBitacoraComercial(BitacoraComercialBE BE)
 {
     return(BitacoraComercialDA.ProcesarBitacoraComercial(BE));
 }