protected void Grid_ContextMenuItemClick(object sender, ASPxGridViewContextMenuItemClickEventArgs e) { try { switch (e.Item.Name) { case "ExportToPDF": ASPxGridViewExporter1.WritePdfToResponse(); break; case "ExportToXLS": ASPxGridViewExporter1.WriteXlsToResponse(); break; case "ExportToWORD": ASPxGridViewExporter1.WriteRtfToResponse(); break; case "ExportToCSV": ASPxGridViewExporter1.WriteCsvToResponse(); break; } } catch (Exception ex) { //_Security.ErrorDesscription = ex.Message; //_Security.ErrorModule = "Exporting Corporation Tax Inquiry"; //_Security.SaveError(); } }
protected void CmdExport_Click(object sender, EventArgs e) { //导出 ASPxGridView1.DataSource = dc.GetTable(Session["str"].ToString()); ASPxGridView1.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse("零件替换关系"); }
protected void mnuPrincipal_ItemClick(object source, MenuItemEventArgs e) { try { switch (e.Item.Name) { case "btnExport": { ASPxGridViewExporter1.GridViewID = "gv"; XlsExportOptions xlsOpciones = new XlsExportOptions(TextExportMode.Text, true, false); ASPxGridViewExporter1.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse(xlsOpciones); break; } case "btnLimpiar": { gv.DataSource = null; gv.DataBind(); mnuPrincipal.Items[0].Enabled = false; break; } default: break; } } catch (Exception ex) { string a = ex.Message; } }
protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridView1.Columns.RemoveAt(26); ASPxGridView1.Columns.RemoveAt(25); ASPxGridView1.Columns.RemoveAt(24); ASPxGridView1.Columns.RemoveAt(23); ASPxGridView1.Columns.RemoveAt(22); ASPxGridView1.Columns.RemoveAt(21); ASPxGridView1.Columns.RemoveAt(20); ASPxGridView1.Columns.RemoveAt(19); ASPxGridView1.Columns.RemoveAt(18); ASPxGridView1.Columns.RemoveAt(17); ASPxGridView1.Columns.RemoveAt(16); ASPxGridView1.Columns.RemoveAt(15); ASPxGridView1.Columns.RemoveAt(14); ASPxGridView1.Columns.RemoveAt(13); ASPxGridView1.Columns.RemoveAt(12); ASPxGridView1.Columns.RemoveAt(11); GridViewDataTextColumn d3 = new GridViewDataTextColumn(); d3.Caption = "客户"; d3.VisibleIndex = 7; d3.FieldName = "CUSTOMER_NAME"; ASPxGridView1.Columns.Add(d3); GridViewDataTextColumn d1 = new GridViewDataTextColumn(); d1.Caption = "备注"; d1.VisibleIndex = 17; d1.FieldName = "REMARK"; ASPxGridView1.Columns.Add(d1); ASPxGridViewExporter1.WriteXlsToResponse("导出计划"); }
protected void BtnExport_Click(object sender, EventArgs e) { string sql = Session["mmsMaterialSend001"] as string; ASPxGridView1.DataSource = dc.GetTable(sql); ASPxGridView1.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse(); }
protected void btnXlsExport_Click(object sender, EventArgs e) { DataTable table1 = Session["rept3400table"] as DataTable; ASPxGridView1.DataSource = table1; ASPxGridView1.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse("乱序附装领料单导出"); }
protected void BtnExport_Click(object sender, EventArgs e) { DataTable table1 = Session["MaterialSend_YXH"] as DataTable; ASPxGridView1.DataSource = table1; ASPxGridView1.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse("柳汽发料打印--导出"); }
protected void btnXlsExport1_Click(object sender, EventArgs e) { string sql = Session["2800ONLINE"].ToString(); DataTable dt = dc.GetTable(sql); ASPxGridView3.DataSource = dt; ASPxGridView3.DataBind(); ASPxGridViewExporter1.WriteXlsToResponse("在制品物料清单导出" + DateTime.Now.ToString() + ".xls"); }
protected void grid_ContextMenuItemClick(object sender, ASPxGridViewContextMenuItemClickEventArgs e) { switch (e.Item.Name) { case "ExportToPDF": ASPxGridViewExporter1.WritePdfToResponse(); break; case "ExportToXLS": ASPxGridViewExporter1.WriteXlsToResponse(); break; } }
//导出计划表 EXCEL protected void btnXlsExport_Click1(object sender, EventArgs e) { ////ASPxGridView subGrid = (ASPxGridView)this.masterGrid.Items[intRow].FindControl("subGrid"); //string plineName = Convert.ToString(ASPxGridView1.GetRowValues(ASPxGridView1.FocusedRowIndex, "PLINE_NAME")); //Console.WriteLine(plineName); //ASPxGridView grid = (ASPxGridView)this.ASPxGridView1; //int rowNum = Convert.ToInt16(ASPxGridView1.FocusedRowIndex); //grid.GetRow(rowNum); ////ASPxGridView1.Columns[3].Visible = false; //setCondition(); ASPxGridViewExporter1.WriteXlsToResponse("Plan_List"); }
protected void mnuPrincipal_ItemClick(object source, MenuItemEventArgs e) { try { switch (e.Item.Name) { case "btnExport": { ASPxGridViewExporter1.GridViewID = "gv"; gv.DataSource = Tabla; ASPxGridViewExporter1.DataBind(); if (ASPxGridViewExporter1 != null) { XlsExportOptions xlsExportOptions = new XlsExportOptions(TextExportMode.Text, true, false); string Titulo = ucEstado.Text.Trim() + " - " + ucOrigen.Text.Trim() + " " + deAnoMes.Text; xlsExportOptions.SheetName = Titulo; ASPxGridViewExporter1.WriteXlsToResponse(xlsExportOptions); } break; } case "btnLimpiar": { gv.DataSource = null; gv.DataBind(); break; } default: break; } } catch (Exception ex) { } }
protected void ASPxButton1_Click(object sender, EventArgs e) { ASPxGridView1.SettingsText.Title = "" + deteedit.Date.ToString("yyyy/MM/dd") + "到" + ASPxDateEdit1.Date.ToString("yyyy/MM/dd") + "单位隐患积分表"; bindByRole(); ASPxGridViewExporter1.WriteXlsToResponse("" + deteedit.Date.ToString("yyyy/MM/dd") + "到" + ASPxDateEdit1.Date.ToString("yyyy/MM/dd") + "单位隐患积分表"); }
protected void ASPxButton1_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse(new XlsExportOptionsEx { ExportType = ExportType.WYSIWYG }); }
protected void ASPxMenu1_ItemClick(object source, MenuItemEventArgs e) { try { ASPxPageControl1.TabPages[3].ClientEnabled = e.Item.Name == "btnAdd"; switch (e.Item.Name) { case "btnAdd": if (ASPxPageControl1.ActiveTabPage.Index == 3) { //for costosCopy only UcIdentifEspacio0.ComboBox.Text = ""; deVigDesde0.Text = ""; deVigHasta0.Text = ""; } FormsHelper.ClearControls(tblCosto, new DTO.CostosDTO()); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Add); CostosFrecuencia = new List <DTO.CostosFrecuenciaDTO>(); CostosProveedor = new List <DTO.CostosProveedorDTO>(); RefreshAbmGrid(gvABMFrecuencia); RefreshAbmGrid(gvABMProveedor); pnlControls.Visible = true; pnlControls.HeaderText = "Agregar Registro"; break; case "btnEdit": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ClearControls(tblCosto, new DTO.CostosDTO()); var entity = Business.Costos.Read(FormsHelper.GetSelectedId(gv).Value); FormsHelper.FillControls(entity, tblCosto); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Edit); CostosFrecuencia = Business.Costos.ReadAllFrecuencia(entity); CostosProveedor = Business.Costos.ReadAllProveedor(entity); ucEspacioChanged(); rbFrecuenciaChanged(); RefreshAbmGrid(gvABMFrecuencia); RefreshAbmGrid(gvABMProveedor); pnlControls.Attributes.Add("RecId", entity.RecId.ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Modificar Registro"; } else { pnlControls.Visible = false; } break; case "btnDelete": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Delete); pnlControls.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Eliminar Registros"; } else { pnlControls.Visible = false; } break; case "btnCommit": if (FormsHelper.GetSelectedId(gv) != null) { pnlCommit.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).Value.ToString()); pnlControls.Visible = false; pnlCommit.Visible = true; } else { pnlCommit.Visible = false; } break; case "btnQuery": if (FormsHelper.GetSelectedId(gv) != null) { pnlVersiones.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).Value.ToString()); RefreshGrid(gvVersiones); pnlVersiones.Visible = true; } else { pnlVersiones.Visible = false; } break; case "btnExport": case "btnExportXls": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WriteXlsToResponse(); } break; case "btnExportPdf": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WritePdfToResponse(); } break; default: break; } } catch (Exception ex) { FormsHelper.MsgError(lblError, ex); } }
//查询 不需要这个函数 //private void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) //{ // setCondition(); // ASPxGridView1.Selection.UnselectAll(); //} //导出EXCEL protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("JIT特殊物料查询"); }
protected void ASPxButton1_Click(object sender, EventArgs e) { SetHeaderStyle(); ASPxGridViewExporter1.GridViewID = SetGrid(); ASPxGridViewExporter1.WriteXlsToResponse(); }
protected void btnXlsExportPlan_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("线边库存导出"); }
protected void btnExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("改制差异清单明细信息导出"); }
protected void ASPxMenu1_ItemClick(object source, MenuItemEventArgs e) { try { switch (e.Item.Name) { case "btnAdd": FormsHelper.ClearControls(tblControls, new DTO.AvisosDTO()); cbIdentifIdentAte.SelectedIndex = -1; FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Add); Atencion = new List <DTO.AvisosIdAtenDTO>(); RefreshAbmGrid(gvABM); pnlControls.Visible = true; pnlControls.HeaderText = "Agregar Registro"; trDias.Visible = true; break; case "btnEdit": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ClearControls(tblControls, new DTO.AvisosDTO()); cbIdentifIdentAte.SelectedIndex = -1; var entity = CRUDHelper.Read(FormsHelper.GetSelectedId(gv).Value, DAO); FormsHelper.FillControls(entity, tblControls); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Edit); Atencion = Business.Avisos.ReadAllAtencion((string)entity.IdentifAviso); gvABM.Attributes.Add("IdentifAviso", entity.IdentifAviso); trDias.Visible = true; RefreshAbmGrid(gvABM); pnlControls.Attributes.Add("RecId", entity.RecId.ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Modificar Registro"; } else { pnlControls.Visible = false; } break; case "btnDelete": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Delete); pnlControls.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Eliminar Registros"; } else { pnlControls.Visible = false; } break; case "btnExport": case "btnExportXls": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WriteXlsToResponse(); } break; case "btnExportPdf": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WritePdfToResponse(); } break; default: break; } } catch (Exception ex) { FormsHelper.MsgError(lblError, ex); } }
protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("按零件号维护现场扫描零件信息导出"); }
protected void BtnExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("领料单明细"); }
protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("现场待处理物料维护导出"); }
protected void bntExportarExcel_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse(); }
protected void ASPxMenu1_ItemClick(object source, MenuItemEventArgs e) { try { switch (e.Item.Name) { case "btnAdd": FormsHelper.ClearControls(tblControls, new DTO.FrecuenciaDTO()); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Add); pnlDias.Visible = false; Detalles = new List <DTO.FrecuenciaDetDTO>(); RefreshAbmGrid(gvABM); pnlControls.Visible = true; pnlControls.HeaderText = "Agregar Registro"; trDias.Visible = true; rbSemMes.Enabled = true; break; case "btnEdit": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ClearControls(tblControls, new DTO.FrecuenciaDTO()); var entity = CRUDHelper.Read(FormsHelper.GetSelectedId(gv).Value, BusinessMapper.GetDaoByEntity(BusinessMapper.eEntities.Frecuencia)); FormsHelper.FillControls(entity, tblControls); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Edit); Detalles = CRUDHelper.ReadAll(string.Format("IdentifFrecuencia = '{0}'", entity.IdentifFrecuencia), BusinessMapper.GetDaoByEntity(BusinessMapper.eEntities.FrecuenciaDet)); rbSemMes.Enabled = (Detalles.Count == 0); rbSemMesChanged(); gvABM.Attributes.Add("IdentifFrecuencia", entity.IdentifFrecuencia); trDias.Visible = true; RefreshAbmGrid(gvABM); pnlControls.Attributes.Add("RecId", entity.RecId.ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Modificar Registro"; } else { pnlControls.Visible = false; } break; case "btnDelete": rbSemMes.Enabled = (Detalles.Count == 0); if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Delete); pnlControls.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Eliminar Registros"; } else { pnlControls.Visible = false; } break; case "btnExport": case "btnExportXls": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.GridViewID = "gv"; } ASPxGridViewExporter1.WriteXlsToResponse(); break; case "btnExportPdf": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.GridViewID = "gv"; } ASPxGridViewExporter1.WritePdfToResponse(); break; default: break; } } catch (Exception ex) { FormsHelper.MsgError(lblError, ex); } }
protected void CmdExport_Click(object sender, EventArgs e) { //导出 ASPxGridViewExporter1.WriteXlsToResponse("零件替换关系"); }
//protected void ASPxGridView1_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) //{ // string flag = e.Parameters.ToString(); // if (flag == "插入") // { // for (int a = 0; a < ListInsert.Items.Count; a++) // { // string zddm = ListInsert.Items[a].ToString(); // string sql = "select * from zdxlb where zddm='" + zddm + "'"; // dc.setTheSql(sql); // if (dc.GetTable().Rows.Count != 0) // { // showAlert(this, "该站点代码已存在!"); // return; // } // else // { // sql = "select sx from zdxlb where gzdd = rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') order by sx desc"; // dc.setTheSql(sql); // string sx = dc.GetTable().Rows[0][0].ToString(); // sql = "insert into zdxlb (zddm,sx,gzdd)values('" + zddm + "'," + sx + "+1 ,rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') ) "; // dc.ExeSql(sql); // } // } // setCondition1(); // } //} //导出物料清单 EXCEL protected void btnXlsExport_Bom_List(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("Plan_BOM_List"); }
protected void ASPxMenu1_ItemClick(object source, MenuItemEventArgs e) { switch (e.Item.Name) { case "btnAdd": FormsHelper.ClearControls(tblControls, new DTO.IdentAtencionDTO()); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Add); pnlControls.Visible = true; pnlControls.HeaderText = "Agregar Registro"; break; case "btnEdit": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ClearControls(tblControls, new DTO.IdentAtencionDTO()); var entity = CRUDHelper.Read(FormsHelper.GetSelectedId(gv).Value, BusinessMapper.GetDaoByEntity(BusinessMapper.eEntities.IdentAtencion)); FormsHelper.FillControls(entity, tblControls); FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Edit); pnlControls.Attributes.Add("RecId", entity.RecId.ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Modificar Registro"; TipIdentifChanged(); } else { pnlControls.Visible = false; } break; case "btnDelete": if (FormsHelper.GetSelectedId(gv) != null) { FormsHelper.ShowOrHideButtons(tblControls, FormsHelper.eAccionABM.Delete); pnlControls.Attributes.Add("RecId", FormsHelper.GetSelectedId(gv).ToString()); pnlControls.Visible = true; pnlControls.HeaderText = "Eliminar Registros"; } else { pnlControls.Visible = false; } break; case "btnExport": case "btnExportXls": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WriteXlsToResponse(); } break; case "btnExportPdf": if (ASPxGridViewExporter1 != null) { ASPxGridViewExporter1.WritePdfToResponse(); } break; default: break; } }
protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("按物料单独要料信息导出--三方"); }
protected void ASPxButton1_Click(object sender, EventArgs e) { GridView.SettingsText.Title = "外委人员名称表"; ASPxGridViewExporter1.WriteXlsToResponse("外委人员名称表"); }
protected void btnXlsExport_Click(object sender, EventArgs e) { ASPxGridViewExporter1.WriteXlsToResponse("三方物流包装量多余物料信息导出"); }