예제 #1
0
        protected void btnEnviarMotivo_Click(object sender, EventArgs e)
        {
            if (!(String.IsNullOrEmpty(TextBox4.Text)))
            {
                tbl_incidentTableAdapter   incident = new tbl_incidentTableAdapter();
                tbl_actionPlanTableAdapter acPlan   = new tbl_actionPlanTableAdapter();
                tbl_bitacoraTableAdapter   bitac    = new tbl_bitacoraTableAdapter();
                int folio = Convert.ToInt32(Request.QueryString["folio"]);
                acPlan.updateStatus(10, Convert.ToInt32(txt_folio0.Text));
                bitac.Insert(DateTime.Now, "plan de acción rechazado", "Motivo: " + TextBox4.Text, "planAccion", folio, 0, Convert.ToString(Session["userName"]));
                bitac.Dispose();
                incident.updateApprove(10, folio);
                incident.Dispose();
                try
                {
                    enviarCorreoRecha(Convert.ToInt32(Request.QueryString["folio"]), txtMotivo.Text);
                }
                catch (Exception ex)
                {
                    lblError.Text = ex.Message;
                }

                Response.Redirect("dash-incidentes.aspx");
            }
            else
            {
            }
        }
예제 #2
0
        protected void btnAceptar0_Click(object sender, EventArgs e)
        {
            tbl_actionPlanTableAdapter acPlan   = new tbl_actionPlanTableAdapter();
            tbl_incidentTableAdapter   incident = new tbl_incidentTableAdapter();
            tbl_bitacoraTableAdapter   bitac    = new tbl_bitacoraTableAdapter();
            int folio      = Convert.ToInt32(Request.QueryString["folio"]);
            int actionPlan = Convert.ToInt32(txt_folio0.Text);

            acPlan.updateStatus(11, Convert.ToInt32(txt_folio0.Text));
            bitac.Insert(DateTime.Now, "plan de acción validado", "", "planAcción", folio, actionPlan, Convert.ToString(Session["userName"]));
            bitac.Dispose();
            incident.updateApprove(11, folio);
            incident.Dispose();
            acPlan.Dispose();
            correoSHEupdate(Convert.ToInt32(Request.QueryString["folio"]));
            Response.Redirect("dash-incidentes.aspx");
        }
예제 #3
0
        protected void btnGuardaInv_Click(object sender, EventArgs e)
        {
            tbl_actionPlanTableAdapter   actionPlan = new tbl_actionPlanTableAdapter();
            tbl_eventActionsTableAdapter evActions  = new tbl_eventActionsTableAdapter();

            DataSet1.tbl_actionPlanDataTable dtActPlan = new DataSet1.tbl_actionPlanDataTable();
            if (grv_acciones.EditIndex > -1)
            {
            }
            if (txt_folio0.Text == "0")
            {
                int actPlan_id = 0;
                int inciID     = Convert.ToInt32(txt_folio.Text);
                actPlan_id = Convert.ToInt32(actionPlan.getMaxActPlan()) + 1;
                actionPlan.Insert(actPlan_id, "", false, 9, 0, inciID, 9);
                actPlan_id = Convert.ToInt32(actionPlan.getMaxActPlan());

                evActions.updateActPlan(actPlan_id, Convert.ToInt32(txt_folio.Text));

                tbl_bitacoraTableAdapter bitac = new tbl_bitacoraTableAdapter();
                bitac.Insert(DateTime.Now, "plan de acción creado", "", "investigación", Convert.ToInt32(txt_folio.Text), 0, Convert.ToString(Session["userName"]));
                correoSHE(Convert.ToInt32(txt_folio.Text));
            }
            else
            {
                actionPlan.updateStatus(9, Convert.ToInt32(txt_folio0.Text));
                tbl_bitacoraTableAdapter bitac = new tbl_bitacoraTableAdapter();
                bitac.Insert(DateTime.Now, "se ha actualizado el plan de acción", "", "investigación", Convert.ToInt32(txt_folio.Text), 0, Convert.ToString(Session["userName"]));
                correoSHEupdate(Convert.ToInt32(txt_folio.Text));
            }
            tbl_incidentTableAdapter incident = new tbl_incidentTableAdapter();
            int folio = Convert.ToInt32(Request.QueryString["folio"]);

            incident.updateApprove(9, folio);

            actionPlan.Dispose();
            evActions.Dispose();
            dtActPlan.Dispose();
            Response.Redirect("dash-incidentes.aspx");
        }