protected void btnGrabar_Click(object sender, EventArgs e) { var folios = new BO.FolioSeguimiento(); int registro = 0; try { util.GetActionMenu(mpMenu.SelectedItem.Value); string pathSave = ConfigurationManager.AppSettings["rutaSeguimiento"] + "\\" + ViewState[field].ToString(); var dt = folios.Get_RegFile(int.Parse(ViewState[field].ToString()), int.Parse(ViewState["IdTarea"].ToString()), txtDescDocumento.Text, RadAsyncUpload1.UploadedFiles[0].FileName, pathSave); registro = int.Parse(dt.Rows[0][0].ToString()); if (registro > 0) { util.AccessDocument(pathSave); RadAsyncUpload1.UploadedFiles[0].SaveAs(dt.Rows[0][1].ToString()); ClearGrid(gridReporte); DatosInGrid(gridReporte, folios.GetArchivosByTareas(int.Parse(ViewState["IdTarea"].ToString()), int.Parse(ViewState["IdTareaExchange"].ToString()))); RadAsyncUpload1.UploadedFiles.Clear(); txtDescDocumento.Text = string.Empty; } else { folios.Del_RegFile(registro); ClearGrid(gridReporte); } } catch (IOException ioe) { Alert.Show(ioe.Message, this.Page); } catch (AccessViolationException ave) { Alert.Permisos(this.Page); } catch (Exception ex) { folios.Del_RegFile(registro); } }
protected void btnDocumentos_Click(object sender, EventArgs e) { var folios = new BO.Cierre(); int registro = 0; try { util.GetActionMenu(mpMenu.SelectedItem.Value); string pathSave = ConfigurationManager.AppSettings["rutaLiberacion"] + "\\" + ViewState["IdFolio"].ToString(); var dt = folios.Get_RegFile(int.Parse(ViewState["IdFolio"].ToString()), int.Parse(ViewState["Release"].ToString()), txtDescDocumento.Text, RadAsyncUpload1.UploadedFiles[0].FileName, pathSave); registro = int.Parse(dt.Rows[0][0].ToString()); gridReporte.DataSource = null; if (registro > 0) { util.AccessDocument(pathSave); RadAsyncUpload1.UploadedFiles[0].SaveAs(dt.Rows[0][1].ToString()); gridReporte.DataSource = folios.GetArchivosByCierre(int.Parse(ViewState["Release"].ToString())); } else { folios.Del_RegFile(registro); } gridFolio.DataBind(); gridReporte.DataBind(); PanelEstatus.Visible = false; PanelDocumentos.Visible = true; } catch (AccessViolationException ave) { Alert.Permisos(this.Page); } catch (Exception ex) { if (registro > 0) { folios.Del_RegFile(registro); } } }