void btnSave_Click(object sender, EventArgs e) { FrmMsg.Show("正在保存变动的记录,涉及到成本计算可能需要稍长时间..."); string errormsg = string.Empty; foreach (DataRow drow in this.dtblPrds.Rows) { if (drow.RowState == DataRowState.Unchanged) { continue; } this.accPrds.UpdateProductForMinPackingQty(ref errormsg, drow["PrdID"], drow["MinPackingQty"]); this.accPrds.UpdateProductForCostPrice( ref errormsg, drow["PrdID"], drow["CostPrice"]); this.accPrds.UpdateProductForManufDays(ref errormsg, drow["PrdID"], drow["ManufDays"]); drow.AcceptChanges(); } FrmMsg.Hide(); MessageBox.Show("成功保存当前设置"); }
void dgrdvNote_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } long NoteID = (long)this.dtblNotes.DefaultView[irow]["NoteID"]; if (this.dgrdvNote.Columns[icol].Name == this.ColumnbtnEdit.Name) { if (this.frmOper == null) { this.frmOper = new FrmOrderNoteOper(); new FrmStyle(frmOper).SetPopFrmStyle(this); frmOper.AffterSave += this.LoadData; } frmOper.EditNote(NoteID); frmOper.ShowDialog(); } if (this.dgrdvNote.Columns[icol].Name == this.ColumnbtnPrint.Name) { FrmMsg.Show("正在生成打印文档,请稍候......"); this.printer.ExportToExcel(NoteID); FrmMsg.Hide(); } }
void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmMsg.Show("正在下载中,请稍候....."); this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "RepairDeliverNote.xlt", "维修送货单格式.xlt"); FrmMsg.Hide(); }
void dgrdvReconciliation_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } long ReconciliationID = (long)this.dtblReconciliations.DefaultView[irow]["ReconciliationID"]; bool CashSettleFlag = (bool)this.dtblReconciliations.DefaultView[irow]["CashSettleFlag"]; if (this.dgrdvReconciliation.Columns[icol].Name == this.ColumnBtnEdit.Name) { if (CashSettleFlag) { this.CashEdit(ReconciliationID); } else { this.Edit(ReconciliationID); } } if (this.dgrdvReconciliation.Columns[icol].Name == this.ColumnbtnExport.Name) { FrmMsg.Show("正在输出Excel文档,请稍候...."); long[] IDList = new long[] { ReconciliationID }; this.printer.ExportToExcel(IDList); FrmMsg.Hide(); } }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "系统快捷方式"); int rowIndex = 3; int rowcount = this.dgrdv.Rows.Count; int columnCount = this.dgrdv.Columns.Count; //设置页头 for (int i = 0; i < columnCount; i++) { excel.SetCellVal(rowIndex, i + 1, this.dgrdv.Columns[i].HeaderText); } for (int i = 0; i < rowcount; i++) { rowIndex++; for (int j = 0; j < columnCount; j++) { excel.SetCellVal(rowIndex, j + 1, "'" + this.dgrdv[j, i].FormattedValue); } } excel.SetRangeInnerBorder(3, 1, rowIndex, columnCount); excel.SetRangeAutoFit(3, 1, rowIndex, columnCount, true, false); excel.Show(); FrmMsg.Hide(); }
void btnSave_Click(object sender, EventArgs e) { FrmMsg.Show("正在保存中,请稍候..."); string columnname = string.Empty; string errormsg = string.Empty; foreach (DataRow drow in this.dtblXWorkgroup.Rows) { if (drow.RowState == DataRowState.Unchanged) { continue; } foreach (DataRow drowColumn in this.dtblWorkgroup.Rows) { columnname = drowColumn["WorkgroupID"].ToString(); this.accXWorkgroup.SaveManufProcessXWorkgroup( ref errormsg, drow["ManufProcessID"], columnname, drow[columnname]); } } this.dtblInitXWorkgroup = this.accXWorkgroup.GetDataManufProcessXWorkgroup().Tables[0]; FrmMsg.Hide(); MessageBox.Show("成功保存当前产能设置"); }
void dgdvNonPrint_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } long NoteID = (long)this.dtblNonPrints.DefaultView[irow]["NoteID"]; if (this.dgdvNonPrint.Columns[icol].Name == this.ColumnbtnPrint.Name) { FrmMsg.Show("ÕýÔÚÉú³É´òÓ¡Îĵµ£¬ÇëÉÔºò......"); this.printer.ExportToExcel(NoteID); FrmMsg.Hide(); string errormsg = string.Empty; this.accNotes.UpdateBuyOrderNotesForPrint(ref errormsg, NoteID); this.LoadNonPrint(); } if (this.dgdvNonPrint.Columns[icol].DataPropertyName == "NoteCode") { this.ShowFrmDetail(NoteID); } }
void btnExplore_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "委外发料记录"); string caption = "发料日期:" + this.ctrlBetweenDate.DateBegin.ToShortDateString() + "-" + this.ctrlBetweenDate.DateEnd.ToShortDateString(); if (this.ckbSupplierFlag.Checked) { caption += " 委外商:" + this.ctrlSupplierID.CompanyAbbName; } if (this.ckbPrd.Checked) { caption += " 包含物料编号:" + this.ctrlPrdID.PrdEntity.PrdCode + " 名称:" + this.ctrlPrdID.PrdEntity.PrdName + " 规格:" + this.ctrlPrdID.PrdEntity.PrdSpec; } excel.SetCellVal("A2", caption); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmMsg.Show("正在下载中,请稍候....."); this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "PackingSheetList.xlt", "生产制令格式.xlt"); FrmMsg.Hide(); }
void btnSave_Click(object sender, EventArgs e) { FrmMsg.Show("正在保存中,请稍候...."); string errormsg = string.Empty; string columnname = string.Empty; foreach (DataRow drow in this.dtblInstruct.Rows) { if (drow.RowState == DataRowState.Unchanged) { continue; } if (drow["ManufScheduleID"] == DBNull.Value) { continue; } foreach (DataRow drowColumn in this.dtblWorkgroup.Rows) { columnname = drowColumn["WorkgroupID"].ToString(); this.accInstruct.SaveInstruct(ref errormsg, drow["ManufScheduleID"], columnname, drow["Q" + columnname]); } drow.AcceptChanges(); } FrmMsg.Hide(); MessageBox.Show("成功保存当前设置"); }
private void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在打印中,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "系统角色表"); int rowIndex = 2; int rowcount = this.dgrdv.Rows.Count - 1; excel.SetCellVal("A2", "角色名称"); excel.SetCellVal("B2", "角色内容"); excel.SetCellVal("C2", "人员设置"); for (int i = 0; i < rowcount; i++) { rowIndex++; excel.SetCellVal(rowIndex, 1, "'" + this.dgrdv[this.RoleNameColumn.Name, i].FormattedValue); excel.SetCellVal(rowIndex, 2, "'" + this.dgrdv[this.DescriptionColumn.Name, i].FormattedValue); } excel.SetRangeInnerCellSize(200, 20, 2, 2, rowIndex, 2); excel.SetRangeWrap(true, 2, 2, rowIndex, 2); excel.SetRangeInnerBorder(2, 1, rowIndex, 3); excel.SetRangeAutoFit(2, 1, rowIndex, 2, true, true); FrmMsg.Hide(); excel.Show(); }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "(" + this.PsnEntity.PsnName + ")开发排期"); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); for (int i = 4; i <= rowIndex; i++) { //列 for (int j = this.GridScheduleIndex + 2; j <= colIndex; j++) { if (excel.GetCellVal(i, j).ToString() == "是") { excel.SetCellColor(Color.White, Color.Red, i, j); } excel.SetCellVal(i, j, null); } } FrmMsg.Hide(); excel.Show(); }
void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmMsg.Show("正在下载中,请用右击打开,编辑上传更新....."); this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "ExpressBill.xlt", "快递单格式.xlt"); FrmMsg.Hide(); }
void dgrdvNonFinished_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } long NoteID = (long)this.dtblNonFinisheds.DefaultView[irow]["NoteID"]; if (this.dgrdvNonFinished.Columns[icol].Name == this.ColumnbtnPrint.Name) { FrmMsg.Show("正在生成打印文档,请稍候......"); this.printer.ExportToExcel(NoteID); FrmMsg.Hide(); string errormsg = string.Empty; this.accNotes.UpdateBuyOrderNotesForPrint(ref errormsg, NoteID); this.LoadNonFinished(); this.whereclause = this.iniwhereclause; this.LoadFinished(); } if (this.dgrdvNonFinished.Columns[icol].DataPropertyName == "NoteCode") { this.ShowFrmDetail(NoteID); } }
void btnAdd_Click(object sender, EventArgs e) { if (this.ValidateData() == false) { return; } this.SetComputeControl(false); while (this.tabMain.TabCount > 1) { this.tabMain.TabPages.RemoveAt(1); } FrmMsg.Show("正在计算物料....."); CtrlOutSrcSupplyRequireOper ctrlRequire; TabPage page; foreach (DataRow drow in this.dtblOrderItems.Rows) { Application.DoEvents(); if (drow["ManufQty"] == DBNull.Value) { continue; } ctrlRequire = new CtrlOutSrcSupplyRequireOper(); ctrlRequire.New((long)drow["ItemID"], (decimal)drow["ManufQty"]); ctrlRequire.Dock = DockStyle.Fill; page = new TabPage(); page.Text = drow["PONo"].ToString() + "[" + string.Format("{0:0.####}", drow["ManufQty"]) + "]"; page.Controls.Add(ctrlRequire); this.tabMain.TabPages.Add(page); this.ctrlOutSrcSupplyItemOper.AppendItems(ctrlRequire.GetItems(), true); } FrmMsg.Hide(); }
void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { FrmMsg.Show("正在下载中,请稍候....."); this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "ExpressReconciliation.xlt", "代收对账单格式.xlt"); FrmMsg.Hide(); }
void btnExplore_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); this.SaveAMT(); long[] IDList = new long[] { this.ReconciliationID }; this.printerhelper.ExportToExcel(IDList); FrmMsg.Hide(); }
void btnSave_Click(object sender, EventArgs e) { if (this.dtblManufPlans.Select("CheckedFlag=1").Length == 0) { MessageBox.Show("未选择任何生产批次"); return; } DialogResult rul = MessageBox.Show("请仔细检查您的设定,数量一经生成不能变更,但可以取消此制令!", "操作确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rul == DialogResult.No) { return; } string errormsg = string.Empty; bool flag = false; FrmMsg.Show("制令正在保存中,请稍候..."); object objWorkingSheetID = DBNull.Value; object objWorkingSheetCode = DBNull.Value; foreach (DataRow drowManufPlan in this.dtblManufPlans.Rows) { if (drowManufPlan["CheckedFlag"] == DBNull.Value) { continue; } if ((bool)drowManufPlan["CheckedFlag"] == false) { continue; } flag = this.accWorkingSheets.InsertWorkingSheets(ref errormsg, ref objWorkingSheetID, ref objWorkingSheetCode, DateTime.Now.Date, drowManufPlan["ManufPlanID"], drowManufPlan["PrdID"], drowManufPlan["CompanyID"], drowManufPlan["NonFinishedQty"], drowManufPlan["PrdStoreFlag"], drowManufPlan["MtrStoreFlag"], drowManufPlan["DateTarget"], drowManufPlan["Memo"], JERPBiz.Frame.UserBiz.PsnID); if (flag) { this.accManufPlans.UpdateManufPlansForFinishedQty(ref errormsg, drowManufPlan["ManufPlanID"]); this.SaveManufSchedule((long)objWorkingSheetID, drowManufPlan); } } FrmMsg.Hide(); MessageBox.Show("成功保存当前生产制令"); if (this.affterSave != null) { this.affterSave(); } this.Close(); }
void btnPrint_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); TabPage page = this.tabMain.SelectedTab; this.PrintCurrent(excel, 1, page); excel.Show(); FrmMsg.Hide(); }
void btnCustomerExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); DataRow[] drows = this.dtblCustomerRpt.Select("CheckedFlag=1"); long[] ReconciliationIDs = new long[drows.Length]; for (int i = 0; i < ReconciliationIDs.Length; i++) { ReconciliationIDs[i] = (long)drows[i]["ReconciliationID"]; } this.salePrinterhelper.ExportToExcel(ReconciliationIDs); FrmMsg.Hide(); }
void btnSave_Click(object sender, EventArgs e) { if (this.dtblManufPlans.Select("CheckedFlag=1").Length == 0) { MessageBox.Show("未选择任何计划"); return; } DialogResult rul = MessageBox.Show("即将对选中生产计划生成物料计划,请先确认组成物料的正确性,一经保存不能变更!", "操作确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rul == DialogResult.No) { return; } DataTable dtblManufProcess; int PrdID = -1; long ManufPlanID = -1; long ManufProcessID = -1; decimal ManufQty = 0; string errormsg = string.Empty; int index = 1; foreach (DataRow drowManufPlan in this.dtblManufPlans.Rows) { Application.DoEvents(); FrmMsg.Show("正在进行第[" + index.ToString() + "]批次物料计算"); if ((drowManufPlan["CheckedFlag"] == DBNull.Value) || ((bool)drowManufPlan["CheckedFlag"] == false)) { continue; } ManufPlanID = (long)drowManufPlan["ManufPlanID"]; PrdID = (int)drowManufPlan["PrdID"]; ManufQty = (decimal)drowManufPlan ["Quantity"]; dtblManufProcess = this.accManufProcess.GetDataManufProcessByPrdID((int)drowManufPlan["PrdID"]).Tables[0]; foreach (DataRow drow in dtblManufProcess.Rows) { ManufProcessID = (long)drow["ManufProcessID"]; this.SaveBOMPlan(ManufPlanID, ManufProcessID); } this.accManufPlans.UpdateManufPlansForBOMPlan(ref errormsg, ManufPlanID); index++; } FrmMsg.Hide(); MessageBox.Show("成功生成当前物料计划"); if (this.affterSave != null) { this.affterSave(); } this.Close(); }
void btnPrdSave_Click(object sender, EventArgs e) { FrmMsg.Show("正在进行保存中...."); JERPApp.Define.Technology.CtrlDevelopScheduleOperForPrd ctrlSchedule; foreach (TabPage page in this.tabPrd.TabPages) { ctrlSchedule = (JERPApp.Define.Technology.CtrlDevelopScheduleOperForPrd)page.Controls[0]; ctrlSchedule.Save(); } FrmMsg.Hide(); MessageBox.Show("成功进行排期保存.."); this.LoadData(); }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "快递邮费支付"); excel.SetCellVal("A3", "供应商:" + this.txtCompanyName.Text); excel.SetCellVal("A4", "收据单号:" + this.txtNoteCode.Text); excel.SetCellVal("A5", "对账单号:" + this.lnkReconciliationCode.Text); excel.SetCellVal("A6", "支付金额:" + this.txtAmountAMT.Text + " 制单人:" + this.txtMakerPsn.Text); excel.Show(); FrmMsg.Hide(); }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "快递单"); excel.SetCellVal("A2", "快递单号:" + this.txtNoteCode.Text + " 付款日期:" + this.txtDateNote.Text); excel.SetCellVal("A3", "物流公司:" + this.txtCompanyAllName.Text + " 制单人:" + this.txtMakerPsn.Text); excel.SetCellVal("A4", "金额:" + this.txtAmount.Text); excel.SetCellVal("A5", "备注:" + this.rchMemo.Text); excel.Show(); FrmMsg.Hide(); }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
public void Export() { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "委外发料单"); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
void btnExplore_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"PayableReconciliationReport.xlt"); excel.SetCellVal("A1", Year.ToString() + "年产品采购对账表"); int rowIndex = 4; int colIndex = 1; excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, false, false); excel.SetRangeInnerBorder(4, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
void btnExport_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"SalerSettleAMTReport.xlt"); excel.SetCellVal("A1", this.ctrlYear.Year.ToString() + "业务结款报告"); int rowIndex = 4; int colIndex = 1; excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, false, false); excel.SetRangeInnerBorder(4, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
void btnExplore_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "客供物料库存月报表"); excel.SetCellVal("A2", this.ctrlYear.Year.ToString() + "年" + this.ctrlMonth.Month + "月"); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }
void btnExplore_Click(object sender, EventArgs e) { FrmMsg.Show("正在生成打印文档,请稍候......"); Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003(); excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt"); excel.SetCellVal("D1", "物料外发回收单"); excel.SetCellVal("A2", "入库单号:" + this.txtNoteCode.Text + " 制单日期:" + this.txtDateNote.Text + " 制单:" + this.txtMakerPsn.Text); int rowIndex = 3; int colIndex = 1; excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true); excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex); FrmMsg.Hide(); excel.Show(); }