Пример #1
0
        protected void UltraWebGrid1_DeleteRow(object sender, RowEventArgs e)
        {
            String msg = "";

            try
            {
                msg = new server.Inventarios().InventarioEnProcesoEliminar(Convert.ToInt32(e.Row.Cells[0].Value.ToString()));
            }
            catch
            {
                msg = "Hubo un problema al procesar la informacion, intente nuevamente.";
            }
            CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel1, "<script type='text/javascript'>alert('" + msg + "');</script>");
            FillGrid();
        }
Пример #2
0
 protected void btnExportaDetalle_Click(object sender, EventArgs e)
 {
     try
     {
         int       id = Convert.ToInt32(hIdInventario.Value);
         DataTable dt = new server.Inventarios().InventarioEnProcesoDetalle(id);
         DataSet   ds = new DataSet();
         ds.Tables.Add(dt);
         ExportToExcel(ds, 0, Response, "Inventario en Proceso");
     }
     catch (Exception er)
     {
         CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel2, "<script type='text/javascript'>alert('Hubo un problema al Generar el Excel, intente nuevamente');</script>");
     }
 }
Пример #3
0
        protected void btnGenerarInventario_Click(object sender, EventArgs e)
        {
            String msg = "";

            try
            {
                Usuario user = (Usuario)Session["UserLogged"];
                if (user != null)
                {
                    DropDownList cmbPlanta = ((DropDownList)Page.Master.FindControl("cmbPlanta"));
                    int          iPlanta   = Convert.ToInt32(cmbPlanta.SelectedValue);
                    msg = new server.Inventarios().InventarioEnProcesoGenerar(user.CodUsuario, iPlanta);
                }
            }
            catch { msg = "Hubo un problema al generar el Inventario, intente nuevamente."; }
            CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel1, "<script type='text/javascript'>alert('" + msg + "');</script>");
            FillGrid();
        }
Пример #4
0
        protected void btnAjusteAutomatico_Click(object sender, EventArgs e)
        {
            String msg = "";

            try
            {
                Usuario user = (Usuario)Session["UserLogged"];
                if (user != null)
                {
                    if (UltraWebGrid2.Rows.Count > 0)
                    {
                        int idInv = Convert.ToInt32(UltraWebGrid2.Rows[0].Cells[0].Value.ToString());
                        msg = new server.Inventarios().InventarioEnProcesoAjusteAutomatico(user.CodUsuario, idInv);
                    }
                }
            }
            catch
            {
                msg = "Hubo un problema al generar el Inventario, intente nuevamente.";
            }
            CallBackManager.AddScriptBlock(this.Page, WebAsyncRefreshPanel2, "<script type='text/javascript'>alert('" + msg + "');</script>");
            btnBuscaDetalle_Click(null, null);
        }