Пример #1
0
 protected void btnModalEnviarSOATM_Click(object sender, EventArgs e)
 {
     if (txtModalNewSOATM.Text == "" || txtModalNewSOATM.Text == string.Empty)
     {
         txtAlerta1.Visible = true;
     }
     else
     {
         try
         {
             string vQuery = "STEISP_ATMAdminComponentesATM 18, '" + Session["codsoATM"] + "','" + txtModalNewSOATM.Text + "', '" + Session["USUARIO"].ToString() + "'";
             Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
             if (vInfo == 1)
             {
                 txtAlerta1.Visible    = false;
                 txtModalNewSOATM.Text = string.Empty;
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
                 Mensaje("Sistema operativo modificado con éxito", WarningType.Success);
                 UpdateGridView.Update();
                 cargarData();
             }
             else
             {
                 txtAlerta1.Text    = "No se pudo modificar el sistema operativo";
                 txtAlerta1.Visible = true;
             }
         }
         catch (Exception Ex)
         {
             throw;
         }
     }
 }
Пример #2
0
 protected void btnModalCancelarMotivoATM_Click(object sender, EventArgs e)
 {
     if (txtNewMotivoCancelATM.Text == "" || txtNewMotivoCancelATM.Text == string.Empty)
     {
         txtAlerta2.Visible = true;
     }
     else
     {
         try
         {
             string vQuery = "STEISP_ATMAdminComponentesATM 26, '" + Session["ATMCODMOTIVO"] + "','" + txtNewMotivoCancelATM.Text + "','" + Session["USUARIO"].ToString() + "'";
             Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
             if (vInfo == 1)
             {
                 txtAlerta2.Visible         = false;
                 txtNewMotivoCancelATM.Text = string.Empty;
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal2();", true);
                 Mensaje("Motivo de cancelación creada con éxito", WarningType.Success);
                 UpdateGridView.Update();
                 cargarData();
             }
             else
             {
                 txtAlerta2.Text    = "No se pudo crear el motivo";
                 txtAlerta2.Visible = true;
             }
         }
         catch (Exception Ex)
         {
             throw;
         }
     }
 }
Пример #3
0
 protected void btnModalNuevidetMATM_Click(object sender, EventArgs e)
 {
     if (txtNewdetMATM.Text == "" || txtNewdetMATM.Text == string.Empty || DDLNewModelo.SelectedValue == "0")
     {
         //H5Alerta2.Visible = true;
         txtAlerta2.Visible = true;
     }
     else
     {
         try
         {
             string vQuery = "STEISP_ATM_DetalleModelo 2, '" + DDLNewModelo.SelectedValue + "',6,'" + txtNewdetMATM.Text + "','" + Session["USUARIO"].ToString() + "'";
             Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
             if (vInfo == 1)
             {
                 txtAlerta2.Visible         = false;
                 txtNewdetMATM.Text         = string.Empty;
                 DDLNewModelo.SelectedValue = "0";
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal2();", true);
                 Mensaje("Detalle de modelo creada con éxito", WarningType.Success);
                 UpdateGridView.Update();
                 cargarData();
             }
             else
             {
                 txtAlerta2.Text    = "No se pudo crear el detalle de modelo";
                 txtAlerta2.Visible = true;
             }
         }
         catch (Exception Ex)
         {
             throw;
         }
     }
 }
Пример #4
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            try
            {
                this.Text = title;
                // 本机测试没必要改地址,有需求请注释或删除
                this.txtIpAddress.ReadOnly = true;

                // 加个委托显示msg,因为on系列都是在工作线程中调用的,ui不允许直接操作
                AddMsgDelegate         = new ShowMsg(AddMsg);
                updateGridViewDelegate = new UpdateGridView(fnUpdateGridView);

                // 设置服务器事件
                server.OnPrepareListen += new TcpServerEvent.OnPrepareListenEventHandler(OnPrepareListen);
                server.OnAccept        += new TcpServerEvent.OnAcceptEventHandler(OnAccept);
                server.OnSend          += new TcpServerEvent.OnSendEventHandler(OnSend);
                // 两个数据到达事件的一种
                server.OnPointerDataReceive += new TcpServerEvent.OnPointerDataReceiveEventHandler(OnPointerDataReceive);
                // 两个数据到达事件的一种
                //server.OnReceive += new TcpServerEvent.OnReceiveEventHandler(OnReceive);

                server.OnClose    += new TcpServerEvent.OnCloseEventHandler(OnClose);
                server.OnShutdown += new TcpServerEvent.OnShutdownEventHandler(OnShutdown);

                SetAppState(AppState.Stoped);

                AddMsg(string.Format("HP-Socket 版本: {0}", server.Version));
            }
            catch (Exception ex)
            {
                SetAppState(AppState.Error);
                AddMsg(ex.Message);
            }
        }
Пример #5
0
 protected void btnModalEnviarVersionATM_Click(object sender, EventArgs e)
 {
     if (txtModalNewVersionATM.Text == "" || txtModalNewVersionATM.Text == string.Empty)
     {
         txtAlerta1.Visible = true;
     }
     else
     {
         try
         {
             string vQuery = "SPSTEI_ATM 28, '" + Session["codversionATM"] + "','" + txtModalNewVersionATM.Text + "'";
             Int32  vInfo  = vConexionATM.ejecutarSQLATM(vQuery);
             if (vInfo == 1)
             {
                 txtAlerta1.Visible         = false;
                 txtModalNewVersionATM.Text = string.Empty;
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
                 Mensaje("Versión del software modificado con éxito", WarningType.Success);
                 UpdateGridView.Update();
                 cargarData();
             }
             else
             {
                 txtAlerta1.Text    = "No se pudo modificar la versión del software";
                 txtAlerta1.Visible = true;
             }
         }
         catch (Exception Ex)
         {
             throw;
         }
     }
 }
Пример #6
0
 protected void btnModalNueviTipoCargaATM_Click(object sender, EventArgs e)
 {
     if (txtNewtipocargaATM.Text == "" || txtNewtipocargaATM.Text == string.Empty)
     {
         txtAlerta2.Visible = true;
     }
     else
     {
         try
         {
             string vQuery = "SPSTEI_ATM 20,'" + txtNewtipocargaATM.Text + "'";
             Int32  vInfo  = vConexionATM.ejecutarSQLATM(vQuery);
             if (vInfo == 1)
             {
                 txtAlerta2.Visible      = false;
                 txtNewtipocargaATM.Text = string.Empty;
                 ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal2();", true);
                 Mensaje("Tipo de carga ATM creada con éxito", WarningType.Success);
                 UpdateGridView.Update();
                 cargarData();
             }
             else
             {
                 txtAlerta2.Text    = "No se pudo crear el tipo de carga ATM";
                 txtAlerta2.Visible = true;
             }
         }
         catch (Exception Ex)
         {
             throw;
         }
     }
 }
Пример #7
0
    public void showIncomes()
    {
        userid = (int)Session["UserId"];
        DataTable dt = bli.GetAllIncome(userid);

        GridView1.DataSource = dt;
        GridView1.DataBind();
        UpdateGridView.Update();
    }
Пример #8
0
    public void showSortedExpense(string sort)
    {
        userid = (int)Session["UserId"];
        DataTable dt = ble.getAllSortedExpense(userid, sort);

        GridView1.DataSource = dt;
        GridView1.DataBind();
        UpdateGridView.Update();
    }
        protected void TxBuscarEmpleado_TextChanged(object sender, EventArgs e)
        {
            try{
                CargarAutorizaciones();

                String    vBusqueda = TxBuscarEmpleado.Text;
                DataTable vDatos    = (DataTable)Session["DATOSAUTORIZAR"];

                if (vBusqueda.Equals(""))
                {
                    GVBusqueda.DataSource = vDatos;
                    GVBusqueda.DataBind();
                    UpdateGridView.Update();
                }
                else
                {
                    EnumerableRowCollection <DataRow> filtered = vDatos.AsEnumerable()
                                                                 .Where(r => r.Field <String>("Empleado").Contains(vBusqueda.ToUpper()));


                    DataTable vDatosFiltrados = new DataTable();
                    vDatosFiltrados.Columns.Add("idPermiso");
                    vDatosFiltrados.Columns.Add("Empleado");
                    vDatosFiltrados.Columns.Add("TipoPermiso");
                    vDatosFiltrados.Columns.Add("FechaInicio");
                    vDatosFiltrados.Columns.Add("FechaRegreso");
                    vDatosFiltrados.Columns.Add("FechaSolicitud");
                    vDatosFiltrados.Columns.Add("Autorizado");
                    vDatosFiltrados.Columns.Add("AutorizadoSAP");
                    vDatosFiltrados.Columns.Add("Detalle");

                    foreach (DataRow item in filtered)
                    {
                        vDatosFiltrados.Rows.Add(
                            item["idPermiso"].ToString(),
                            item["Empleado"].ToString(),
                            item["TipoPermiso"].ToString(),
                            item["FechaInicio"].ToString(),
                            item["FechaRegreso"].ToString(),
                            item["FechaSolicitud"].ToString(),
                            item["Autorizado"].ToString(),
                            item["AutorizadoSAP"].ToString(),
                            item["Detalle"].ToString()
                            );
                    }

                    GVBusqueda.DataSource = vDatosFiltrados;
                    GVBusqueda.DataBind();
                    Session["DATOSAUTORIZAR"] = vDatosFiltrados;
                    UpdateGridView.Update();
                }
            }catch (Exception Ex) {
                Mensaje(Ex.Message, WarningType.Danger);
            }
        }
Пример #10
0
    public void showSortedExpense(string sort)
    {
        userid = (int)Session["UserId"];
        DateTime  from = Convert.ToDateTime(hdFrom.Value);
        DateTime  to   = Convert.ToDateTime(hdTo.Value);
        DataTable dt   = ble.getAllSortedReport(userid, sort, Convert.ToDateTime(from.ToShortDateString()), Convert.ToDateTime(to.ToShortDateString()));

        gridReport.DataSource = dt;
        gridReport.DataBind();
        UpdateGridView.Update();
    }
Пример #11
0
        protected void TxBuscarPuesto_TextChanged(object sender, EventArgs e)
        {
            try{
                CargarPuesto();

                String    vBusqueda = TxBuscarPuesto.Text;
                DataTable vDatos    = (DataTable)Session["DATAPUESTOS"];

                if (vBusqueda.Equals(""))
                {
                    GVBusqueda.DataSource = vDatos;
                    GVBusqueda.DataBind();
                    UpdateGridView.Update();
                }
                else
                {
                    EnumerableRowCollection <DataRow> filtered = vDatos.AsEnumerable()
                                                                 .Where(r => r.Field <String>("nombre").Contains(vBusqueda.ToUpper()));

                    Boolean isNumeric = int.TryParse(vBusqueda, out int n);

                    if (isNumeric)
                    {
                        if (filtered.Count() == 0)
                        {
                            filtered = vDatos.AsEnumerable().Where(r =>
                                                                   Convert.ToInt32(r["idPuesto"]) == Convert.ToInt32(vBusqueda));
                        }
                    }


                    DataTable vDatosFiltrados = new DataTable();
                    vDatosFiltrados.Columns.Add("idPuesto");
                    vDatosFiltrados.Columns.Add("nombre");
                    vDatosFiltrados.Columns.Add("Departamento");

                    foreach (DataRow item in filtered)
                    {
                        vDatosFiltrados.Rows.Add(
                            item["idPuesto"].ToString(),
                            item["nombre"].ToString(),
                            item["Departamento"].ToString()
                            );
                    }

                    GVBusqueda.DataSource = vDatosFiltrados;
                    GVBusqueda.DataBind();
                    Session["DATAPUESTOS"] = vDatosFiltrados;
                    //UpdateGridView.Update();
                }
            }
            catch (Exception Ex) { Mensaje(Ex.Message, WarningType.Danger); }
        }
Пример #12
0
        private void UpdateDataGridView(GameProgress progress)
        {
            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (this.TrackerDataGrid.InvokeRequired)
            {
                UpdateGridView d = new UpdateGridView(UpdateDataGridView);
                this.Invoke(d, new object[] { progress });
            }
            else
            {
                // Style
                if (darkTheme)
                {
                    TrackerDataGrid.RowTemplate.DefaultCellStyle.SelectionForeColor =
                        TrackerDataGrid.RowTemplate.DefaultCellStyle.ForeColor      = Color.White;
                    TrackerDataGrid.RowTemplate.DefaultCellStyle.SelectionBackColor =
                        TrackerDataGrid.RowTemplate.DefaultCellStyle.BackColor      =
                            TrackerDataGrid.BackgroundColor = Color.Black;
                }
                else
                {
                    TrackerDataGrid.RowTemplate.DefaultCellStyle.SelectionForeColor =
                        TrackerDataGrid.RowTemplate.DefaultCellStyle.ForeColor      = Color.Black;
                    TrackerDataGrid.RowTemplate.DefaultCellStyle.SelectionBackColor =
                        TrackerDataGrid.RowTemplate.DefaultCellStyle.BackColor      =
                            TrackerDataGrid.BackgroundColor = Color.White;
                }

                // Content
                this.TrackerDataGrid.Rows.Clear();
                foreach (Requirement r in progress.Requirements)
                {
                    TrackerDataGrid.Rows.Add(new string[] { r.Name, FormatString(r.Progression) });
                }

                if (showPercentage)
                {
                    string[] row8 = { "Progression", PercentageFormatter.Format(progress.Percentage, accuracy) };
                    TrackerDataGrid.Rows.Add(row8);
                }

                if (TrackerDataGrid.Rows.Count >= 2)
                {
                    TrackerDataGrid.Height = (TrackerDataGrid.Rows[0].Height * (TrackerDataGrid.Rows.Count + 1));
                    this.Height            = TrackerDataGrid.Size.Height + WindowHeaderHeight + 5;
                }

                // refresh
                TrackerDataGrid.Invalidate();
            }
        }
Пример #13
0
        protected void TxBuscarMantenimientoATM_TextChanged(object sender, EventArgs e)
        {
            try
            {
                cargarData();

                String    vBusqueda = TxBuscarMantenimientoATM.Text;
                DataTable vDatos    = (DataTable)Session["ATM_MATERIALES_MANTENIMIENTO"];

                if (vBusqueda.Equals(""))
                {
                    GVBusqueda.DataSource = vDatos;
                    GVBusqueda.DataBind();
                    UpdateGridView.Update();
                    //cargarData();
                }
                else
                {
                    EnumerableRowCollection <DataRow> filtered = vDatos.AsEnumerable()
                                                                 .Where(r => r.Field <String>("NomATM").Contains(vBusqueda));

                    DataTable vDatosFiltrados = new DataTable();
                    vDatosFiltrados.Columns.Add("ID");
                    vDatosFiltrados.Columns.Add("Codigo");
                    vDatosFiltrados.Columns.Add("NomATM");
                    vDatosFiltrados.Columns.Add("Ubicacion");
                    vDatosFiltrados.Columns.Add("Sucursal");
                    vDatosFiltrados.Columns.Add("Tecnico");
                    foreach (DataRow item in filtered)
                    {
                        vDatosFiltrados.Rows.Add(
                            item["ID"].ToString(),
                            item["Codigo"].ToString(),
                            item["NomATM"].ToString(),
                            item["Ubicacion"].ToString(),
                            item["Sucursal"].ToString(),
                            item["Tecnico"].ToString()
                            );
                    }

                    GVBusqueda.DataSource = vDatosFiltrados;
                    GVBusqueda.DataBind();
                    Session["ATM_MATERIALES_MANTENIMIENTO"] = vDatosFiltrados;
                    UpdateGridView.Update();
                }
            }
            catch (Exception Ex)
            {
                Mensaje(Ex.Message, WarningType.Danger);
            }
        }
Пример #14
0
        protected void txtbuscarHotel_TextChanged(object sender, EventArgs e)
        {
            try
            {
                cargarData();

                String    vBusqueda = txtbuscarHotel.Text;
                DataTable vDatos    = (DataTable)Session["HOTELESyHABITACIONES"];

                if (vBusqueda.Equals(""))
                {
                    GVSolicitud.DataSource = vDatos;
                    GVSolicitud.DataBind();
                    UpdateGridView.Update();
                    //cargarData();
                }
                else
                {
                    EnumerableRowCollection <DataRow> filtered = vDatos.AsEnumerable()
                                                                 .Where(r => r.Field <String>("Hotel").Contains(vBusqueda));

                    DataTable vDatosFiltrados = new DataTable();
                    vDatosFiltrados.Columns.Add("IDHotel");
                    vDatosFiltrados.Columns.Add("IDHabitacion");
                    vDatosFiltrados.Columns.Add("Hotel");
                    vDatosFiltrados.Columns.Add("Habitacion");
                    vDatosFiltrados.Columns.Add("Costo");

                    foreach (DataRow item in filtered)
                    {
                        vDatosFiltrados.Rows.Add(
                            item["IDHotel"].ToString(),
                            item["IDHabitacion"].ToString(),
                            item["Hotel"].ToString(),
                            item["Habitacion"].ToString(),
                            item["Costo"].ToString()

                            );
                    }

                    GVSolicitud.DataSource = vDatosFiltrados;
                    GVSolicitud.DataBind();
                    Session["HOTELESyHABITACIONES"] = vDatosFiltrados;
                    UpdateGridView.Update();
                }
            }
            catch (Exception Ex)
            {
                Mensaje(Ex.Message, WarningType.Danger);
            }
        }
Пример #15
0
        protected void btnReprogramarNotif_Click(object sender, EventArgs e)
        {
            //lbModalFechaMan.Text = "";
            if (txtNewFechaInicio.Text == "" || txtNewFechaInicio.Text == string.Empty)
            {
                txtAlerta1.Visible = true;
                H5Alerta.Visible   = true;
            }
            else
            {
                String vFormato = "yyyy/MM/dd";
                string NewFecha = Convert.ToDateTime(txtNewFechaInicio.Text).ToString(vFormato);
                try
                {
                    string vQuery = "STEISP_ATM_Reprogramacion 1, '" + Session["codNotificacionRE"] + "','" + NewFecha + "', '" + Session["USUARIO"].ToString() + "'";
                    Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
                    if (vInfo != 0)
                    {
                        CorreoReprogramar();
                        //string vQuery2 = "STEISP_ATM_VerificacionTotal 8, '" + Session["codNotificacionRE"] + "'";
                        // vConexion.ejecutarSQL(vQuery2);
                        string vQuery3 = "STEISP_ATM_Reprogramacion 4, '" + Session["codNotificacionRE"] + "'";
                        vConexion.ejecutarSQL(vQuery3);

                        H5Alerta.Visible   = false;
                        txtAlerta1.Visible = false;
                        H5Alerta.Visible   = false;
                        Session["ATM_IDZONA_REPROGRAMAR"] = null;
                        Session["UsuResponsable"]         = null;
                        txtNewFechaInicio.Text            = string.Empty;
                        ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
                        Mensaje("Mantenimiento reprogramado con éxito", WarningType.Success);
                        UpdateGridView.Update();
                        //EnviarCorreo();
                        cargarData();
                    }
                    else
                    {
                        H5Alerta.InnerText = "No se pudo reprogramar mantenimiento";
                        H5Alerta.Visible   = true;
                    }
                }
                catch (Exception Ex)
                {
                    Mensaje(Ex.Message, WarningType.Danger);
                }
            }
        }
Пример #16
0
        protected void TxBuscarATM_TextChanged(object sender, EventArgs e)
        {
            try
            {
                cargarData();

                String    vBusqueda = TxBuscarATM.Text.ToUpper().ToString();
                DataTable vDatos    = (DataTable)Session["ATM"];

                if (vBusqueda.Equals(""))
                {
                    GVBusqueda.DataSource = vDatos;
                    GVBusqueda.DataBind();
                    UpdateGridView.Update();
                    //cargarData();
                }
                else
                {
                    EnumerableRowCollection <DataRow> filtered = vDatos.AsEnumerable()
                                                                 .Where(r => r.Field <String>("Codigo").Contains(vBusqueda));

                    DataTable vDatosFiltrados = new DataTable();
                    vDatosFiltrados.Columns.Add("Codigo");
                    vDatosFiltrados.Columns.Add("Nombre");
                    vDatosFiltrados.Columns.Add("TipoATM");
                    vDatosFiltrados.Columns.Add("Estado");
                    foreach (DataRow item in filtered)
                    {
                        vDatosFiltrados.Rows.Add(
                            item["Codigo"].ToString(),
                            item["Nombre"].ToString(),
                            item["TipoATM"].ToString(),
                            item["Estado"].ToString()
                            );
                    }

                    GVBusqueda.DataSource = vDatosFiltrados;
                    GVBusqueda.DataBind();
                    Session["ATM"] = vDatosFiltrados;
                    UpdateGridView.Update();
                }
            }
            catch (Exception Ex)
            {
                Mensaje(Ex.Message, WarningType.Danger);
            }
        }
Пример #17
0
    public void showExpense()
    {
        userid = (int)Session["UserId"];
        DataTable dt = ble.GetAllExpense(userid);

        if (dt.Rows.Count > 1)
        {
            sortRow.Visible = true;
        }
        else
        {
            sortRow.Visible = false;
        }
        GridView1.DataSource = dt;
        GridView1.DataBind();
        lblEmpty.Visible = false;
        UpdateGridView.Update();
    }
Пример #18
0
    public void showExpense()
    {
        userid = (int)Session["UserId"];
        DateTime from = Convert.ToDateTime(txtfrom.Text);
        DateTime to   = Convert.ToDateTime(txtto.Text);

        hdFrom.Value = from.ToShortDateString();
        hdTo.Value   = to.ToShortDateString();
        DataTable dt = ble.getExpenseByDateRange(userid, Convert.ToDateTime(from.ToShortDateString()), Convert.ToDateTime(to.ToShortDateString()));

        Session.Add("report", dt);
        if (dt.Rows.Count > 1)
        {
            SSrow.Visible = true;
        }
        gridReport.DataSource = dt;
        gridReport.DataBind();
        UpdateGridView.Update();
    }
        void limpiar()
        {
            txtModalModificarTransporte.Text = "";
            txtModalTransporte.Text          = "";
            txtbuscarTransporte.Text         = "";
            UPBuscarTra.Update();
            GVSolicitud.DataSource = null;
            GVSolicitud.DataBind();
            UpdateGridView.Update();
            UPBuscarTra.Update();

            //CARGAR TRANPORTE
            DataTable vDato = new DataTable();

            vDato = vConexion.obtenerDataTable("VIATICOS_ObtenerGenerales 34");
            GVSolicitud.DataSource = vDato;
            GVSolicitud.DataBind();
            Session["TRANSPORTES"] = vDato;
        }
        void limpiar()
        {
            txtModalModificarMotivo.Text = "";
            txtbuscarMotivos.Text        = "";
            txtbuscarMotivos.Text        = "";
            DDLModalEstado.SelectedValue = "1";
            UPBuscarTra.Update();
            GVSolicitud.DataSource = null;
            GVSolicitud.DataBind();
            UpdateGridView.Update();
            UPBuscarTra.Update();

            //CARGAR MOTIVOS
            DataTable vDato = new DataTable();

            vDato = vConexion.obtenerDataTable("VIATICOS_ObtenerGenerales 38");
            GVSolicitud.DataSource = vDato;
            GVSolicitud.DataBind();
            Session["MOTIVOSVIAJES"] = vDato;
        }
Пример #21
0
        protected void btnModalModificar_Click(object sender, EventArgs e)
        {
            try
            {
                validar();

                string vQuery  = "VIATICOS_ObtenerGenerales 32, '" + Session["VIATICOS_MANT_CODHOTEL"] + "', '" + txtModalHotel.Text + "','" + DDLModalUbicacion.SelectedValue + "','" + DDLModalDesayuno.SelectedValue + "','" + Session["USUARIO"].ToString() + "'";
                Int32  vInfo   = vConexion.ejecutarSql(vQuery);
                string vQuery2 = "VIATICOS_ObtenerGenerales 33, '" + Session["VIATICOS_MANT_CODHABITACION"] + "', '" + txtModalHabitacion.Text + "','" + Session["VIATICOS_MANT_CODHOTEL"] + "','" + txtModalPrecio.Text + "'";
                Int32  vInfo2  = vConexion.ejecutarSql(vQuery2);
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal3();", true);
                limpiar();
                UpdateGridView.Update();
                Mensaje("Hotel modificado con éxito", WarningType.Success);
            }
            catch (Exception ex)
            {
                Mensaje(ex.Message, WarningType.Danger);
            }
        }
Пример #22
0
        protected void BtnModEmpleados_Click(object sender, EventArgs e)
        {
            try{
                String vQuery = "RSP_IngresarEmpleados 2," + LbModNoEmpleado.Text + "," +
                                "'" + TxModNombre.Text + "'," +
                                "'" + DDLModArea.SelectedItem.Text + "'," +
                                "'" + DDLModCiudad.SelectedValue + "'," +
                                "'" + null + "'," +
                                "'" + TxModIdentidad.Text + "'," +
                                "'" + TxModNacimiento.Text + "'," +
                                "'" + null + "'," +
                                "'" + TxModEmailEmpresa.Text + "'," +
                                "'" + TxModEmailPersonal.Text + "'," +
                                "'" + TxModTelefono.Text + "'," +
                                "'" + TxModCodigoSAP.Text + "'," +
                                "'" + DDLEstado.SelectedValue + "'," +
                                "'" + DDLModTurnos.SelectedValue + "'," +
                                "'" + DDLModPuestos.SelectedValue + "','" +
                                DDLModJefatura.SelectedValue + "'," +
                                "'" + TxModADUser.Text + "'";

                Int32 vInformacion = vConexion.ejecutarSql(vQuery);
                if (vInformacion == 1)
                {
                    String vActivo = CBxPermisos.Checked ? "1" : "0";

                    vQuery       = "[RSP_IngresarEmpleados] 4," + LbModNoEmpleado.Text + ",'" + vActivo + "'";
                    vInformacion = vConexion.ejecutarSql(vQuery);

                    if (vInformacion == 1)
                    {
                        Mensaje("Actualizado con Exito!", WarningType.Success);
                        CerrarModal("EmpleadoModal");
                        CargarEmpleados();
                        UpdateGridView.Update();
                    }
                }
            }
            catch (Exception Ex) { Mensaje(Ex.Message, WarningType.Danger); }
        }
Пример #23
0
        private void Form1_Load(object sender, EventArgs e)
        {
            connectString = "Data Source=(LocalDB)\\v11.0;Initial Catalog=testdb;Integrated Security=True";
            sqlCnt = new SqlConnection(connectString);
            //comboBox1.SelectedIndex = 1;
            //th = new Thread(Updata);
            //th = new Thread(new ThreadStart(DoWork));
            //th = new Thread(new ThreadStart(delegate
            //{
            //    threadwork();
            //}));
            //objThread.Start();
            CreateChart(graph);

            updategrdv = new UpdateGridView(Updata);
            updategrph = new UpdateGraph(UpdateGra);
        }
Пример #24
0
        protected void btnMantSinRealizar_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtdetalleCancela.Text == "" || DDLModalMotivo.SelectedValue == "0" || DDLModalcambioPor.SelectedValue == "0")

                {
                    H5Alerta.Visible   = true;
                    txtAlerta2.Visible = true;
                }
                else
                {
                    if (DDLModalMotivo.SelectedValue == "5")
                    {
                        try
                        {
                            string vQuery = "STEISP_ATM_CancelarVerificacion 2, '" + Session["ATM_ID_CANCELAR_VERIF_MODAL"] + "','" + DDLModalMotivo.SelectedValue + "','" + DDLModalcambioPor.SelectedValue + "','" + Session["USUARIO"].ToString() + "', '" + DDLModalNewTecnico.SelectedValue + "','" + txtdetalleCancela.Text + "'";
                            Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
                            if (vInfo == 1)
                            {
                                CorreoCancelar();
                                H5Alerta.Visible   = false;
                                txtAlerta2.Visible = false;
                                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
                                Mensaje("Verificación cancelada con éxito", WarningType.Success);
                                UpdateGridView.Update();
                                limpiarModalVerificacion();
                                cargarData();
                            }
                            else
                            {
                                H5Alerta.InnerText = "No se pudo realizar la acción";
                                H5Alerta.Visible   = true;
                            }
                        }
                        catch (Exception Ex)
                        {
                            throw;
                        }
                    }
                    else
                    {
                        try
                        {
                            string vQuery = "STEISP_ATM_CancelarVerificacion 1, '" + Session["ATM_ID_CANCELAR_VERIF_MODAL"] + "','" + DDLModalMotivo.SelectedValue + "','" + DDLModalcambioPor.SelectedValue + "','" + Session["USUARIO"].ToString() + "', '" + DDLModalNewTecnico.SelectedValue + "','" + txtdetalleCancela.Text + "'";
                            Int32  vInfo  = vConexion.ejecutarSQL(vQuery);
                            if (vInfo != 0)
                            {
                                H5Alerta.Visible = false;
                                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
                                Mensaje("Verificación cancelada con éxito", WarningType.Success);
                                // CorreoCancelar();
                                UpdateGridView.Update();
                                limpiarModalVerificacion();
                                cargarData();
                            }
                            else
                            {
                                H5Alerta.InnerText = "No se pudo realizar la acción";
                                H5Alerta.Visible   = true;
                            }
                        }
                        catch (Exception Ex)
                        {
                            throw;
                        }
                    }
                    H5Alerta.Visible   = false;
                    txtAlerta2.Visible = false;
                }
            }
            catch (Exception EX)
            {
                Mensaje(EX.Message, WarningType.Danger);
            }
        }