Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        private void BomToExcel(Office2003Helper.Excel2003 excel, int SheetIndex)
        {
            excel.SetCurSheet(SheetIndex);
            excel.SetCellVal("A1", this.PrdEntity.PrdCode + "  " + this.PrdEntity.PrdName);
            DataTable dtblBOM  = this.accBOM.GetDataBOMTreeByPrdID(this.PrdEntity.PrdID, "   ", "").Tables[0];
            int       rowIndex = 4;

            if (dtblBOM.Rows.Count > 1)
            {
                excel.InsertRows(rowIndex, rowIndex, dtblBOM.Rows.Count - 1);
            }
            foreach (DataRow drow in dtblBOM.Rows)
            {
                excel.SetCellVal("A" + rowIndex.ToString(), drow["PrdStatus"]);
                excel.SetCellVal("B" + rowIndex.ToString(), drow["Prefix"]);
                excel.SetCellVal("C" + rowIndex.ToString(), drow["PrdName"]);
                excel.SetCellVal("D" + rowIndex.ToString(), drow["PrdSpec"]);
                excel.SetCellVal("E" + rowIndex.ToString(), drow["Model"]);
                excel.SetCellVal("F" + rowIndex.ToString(), drow["Manufacturer"]);
                excel.SetCellVal("G" + rowIndex.ToString(), drow["AssemblyQty"]);
                excel.SetCellVal("H" + rowIndex.ToString(), drow["LossRate"]);
                excel.SetCellVal("I" + rowIndex.ToString(), drow["UnitName"]);
                excel.SetCellVal("J" + rowIndex.ToString(), drow["SourceTypeName"]);
                excel.SetCellVal("K" + rowIndex.ToString(), drow["Element"]);
                excel.SetCellVal("L" + rowIndex.ToString(), drow["Substitute"]);
                excel.SetCellVal("M" + rowIndex.ToString(), drow["PostProcessing"]);
                excel.SetCellVal("N" + rowIndex.ToString(), drow["Memo"]);
                rowIndex++;
            }
        }
Esempio n. 3
0
        private void PackingToExcel(Office2003Helper.Excel2003 excel, int SheetIndex, int PackingTypeID)
        {
            excel.SetCurSheet(SheetIndex);
            excel.SetCellVal("A1", this.PrdEntity.PrdCode + "  " + this.PrdEntity.PrdName);
            this.PackingTypeEntity.LoadData(PackingTypeID);
            excel.SetCurSheetName(this.PackingTypeEntity.PackingTypeName);
            excel.SetCellVal("B2", this.PackingTypeEntity.PackingTypeName);
            excel.SetCellVal("A7", this.PackingTypeEntity.Description);
            DataTable dtblBOM  = this.accPackingTypeBom.GetDataPackingBOMByPackingTypeID(PackingTypeID).Tables[0];
            int       rowIndex = 5;

            if (dtblBOM.Rows.Count > 1)
            {
                excel.InsertRows(rowIndex, rowIndex, dtblBOM.Rows.Count - 1);
            }
            string RecycleInfor = "是";

            foreach (DataRow drow in dtblBOM.Rows)
            {
                excel.SetCellVal("A" + rowIndex.ToString(), drow["PrdCode"]);
                excel.SetCellVal("B" + rowIndex.ToString(), drow["PrdName"]);
                excel.SetCellVal("C" + rowIndex.ToString(), drow["PrdSpec"]);
                excel.SetCellVal("D" + rowIndex.ToString(), drow["Model"]);
                excel.SetCellVal("E" + rowIndex.ToString(), drow["PrdAssembly"]);
                excel.SetCellVal("F" + rowIndex.ToString(), drow["PackageAssembly"]);
                excel.SetCellVal("G" + rowIndex.ToString(), drow["UnitName"]);
                excel.SetCellVal("H" + rowIndex.ToString(), drow["SourceTypeName"]);
                RecycleInfor = ((bool)drow["RecycleFlag"])?"是":"否";
                excel.SetCellVal("I" + rowIndex.ToString(), RecycleInfor);
                excel.SetCellVal("J" + rowIndex.ToString(), drow["Position"]);
                excel.SetCellVal("K" + rowIndex.ToString(), drow["Memo"]);
                rowIndex++;
            }
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
        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();
        }
 private void ImportTmp(Office2003Helper.Excel2003 excel, int iSheet, long ManufScheduleID)
 {
     this.ScheduleEntity.LoadData(ManufScheduleID);
     this.WrkEntity.LoadData(this.ScheduleEntity.WorkingSheetID);
     excel.SetCurSheet(iSheet);
     if (this.FormatEntity.WorkingSheetCodeCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.WorkingSheetCodeCellName, "'" + this.ScheduleEntity.WorkingSheetCode);
     }
     if (this.FormatEntity.CompanyCodeCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.CompanyCodeCellName, "'" + this.ScheduleEntity.CompanyCode);
     }
     if (this.FormatEntity.PrdCodeCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.PrdCodeCellName, "'" + this.ScheduleEntity.PrdCode);
     }
     if (this.FormatEntity.PrdNameCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.PrdNameCellName, "'" + this.ScheduleEntity.PrdName);
     }
     if (this.FormatEntity.PrdSpecCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.PrdSpecCellName, "'" + this.ScheduleEntity.PrdSpec);
     }
     if (this.FormatEntity.ModelCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.ModelCellName, "'" + this.ScheduleEntity.Model);
     }
     if (this.FormatEntity.PrdStatusCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.PrdStatusCellName, this.ScheduleEntity.PrdStatus);
     }
     if (this.FormatEntity.QuantityCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.QuantityCellName, this.ScheduleEntity.Quantity);
     }
     if (this.FormatEntity.PrdDateTargetCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.PrdDateTargetCellName, string.Format("{0:MM-dd H:mm}", this.WrkEntity.DateTarget));
     }
     if (this.FormatEntity.DateTargetCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.DateTargetCellName, string.Format("{0:MM-dd H:mm}", this.ScheduleEntity.DateTarget));
     }
     if (this.FormatEntity.MemoCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.MemoCellName, this.ScheduleEntity.Memo);
     }
     if (this.FormatEntity.LastPrdStatusCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.LastPrdStatusCellName, this.ScheduleEntity.LastPrdStatus);
     }
     if (this.FormatEntity.NextPrdStatusCellName != string.Empty)
     {
         excel.SetCellVal(this.FormatEntity.NextPrdStatusCellName, this.ScheduleEntity.NextPrdStatus);
     }
 }
        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();
        }
Esempio n. 9
0
        void btnExplore_Click(object sender, EventArgs e)
        {
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", "耗材安全库存");
            excel.SetCellVal("A2", "年份:" + this.Year.ToString());
            int rowIndex = 3;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.Show();
        }
Esempio n. 10
0
        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();
        }
Esempio n. 11
0
        private void PrintCurrent(Office2003Helper.Excel2003 excel, int objSheet, TabPage page)
        {
            excel.SetCurSheet(objSheet);
            excel.SetCurSheetName(page.Text);
            excel.SetCellVal("D1", "客户月订单统计");
            DataGridView dgrdv    = (DataGridView)page.Controls[0];
            int          rowIndex = 3;
            int          colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, false);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
        }
Esempio n. 12
0
 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();
 }
Esempio n. 13
0
 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();
 }
Esempio n. 14
0
        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();
        }
Esempio n. 15
0
        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();
        }
Esempio n. 16
0
        void btnExplore_Click(object sender, EventArgs e)
        {
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", "物料委外库存记录");
            excel.SetCellVal("A3", "起始日期:" + this.dtpDateBegin.Value.ToString()
                             + " 截止日期:" + this.dtpDateEnd.Value.ToString());
            int rowIndex = 4;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.Show();
        }
Esempio n. 17
0
        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();
        }
Esempio n. 18
0
        void btnExport_Click(object sender, EventArgs e)
        {
            FrmMsg.Show("正在生成打印文档,请稍候......");
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("C1", this.ctrlBetweenDate.DateBegin.ToShortDateString() + "-" + this.ctrlBetweenDate.DateEnd.ToShortDateString() + "]产量报告");
            int rowIndex = 3;
            int colIndex = 1;

            excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, false);
            FrmMsg.Hide();
            excel.Show();
        }
 public void ExportToExcel(long[] ReconciliationIDArray)
 {
     Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
     excel.New();
     for (int i = 0; i < ReconciliationIDArray.Length; i++)
     {
         this.PrintExport(excel, ReconciliationIDArray[i], i);
     }
     if (excel.GetSheetsCount() > 1)
     {
         excel.DeleteSheet(1);
     }
     excel.SetCurSheet(1);
     excel.Show();
 }
Esempio n. 20
0
        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", "ºÄ²Ä²É¹ºÇ·ÊýÒ»ÀÀ");
            int rowIndex = 3;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, true);
            FrmMsg.Hide();
            excel.Show();
        }
Esempio n. 21
0
        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.ctrlBranchStoreID.BranchStoreName + "  盘点人:" + this.txtCheckPersons.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();
        }
Esempio n. 22
0
        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();
        }
Esempio n. 23
0
 void btnExport_Click(object sender, EventArgs e)
 {
     FrmMsg.Show("正在生成Excel文档,请稍候......");
     Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
     excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
     excel.SetCellVal("D1", "产品成本一览");
     excel.SetCellVal("A2", "类别:"+this.ctrlPrdTypeID .PrdTypeName );
     int rowIndex = 3;
     int colIndex = 1;
     excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
     excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
     excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, true);
     FrmMsg.Hide();
     excel.Show();
 }
Esempio n. 24
0
        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();
        }
Esempio n. 25
0
        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.txtReconciliationCode.Text +
                             "   物流公司:" + this.txtCompanyName.Text + "   制单日期:" + this.txtDateNote.Text + "  年:" + this.txtYear.Text);
            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();
        }
Esempio n. 26
0
        void btnExplore_Click(object sender, EventArgs e)
        {
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", "产品库存记录");
            excel.SetCellVal("A2", "产品编号:" + this.ctrlPrdID.PrdEntity.PrdCode
                             + " 产品名称:" + this.ctrlPrdID.PrdEntity.PrdName + " 规格:" + this.ctrlPrdID.PrdEntity.PrdSpec);
            excel.SetCellVal("A3", "起始日期:" + this.dtpDateBegin.Value.ToString()
                             + " 截止日期:" + this.dtpDateEnd.Value.ToString() + "  库位:" + this.ctrlBranchStoreID.BranchStoreName);
            int rowIndex = 4;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.Show();
        }
Esempio n. 27
0
        void btnExport_Click(object sender, EventArgs e)
        {
            FrmMsg.Show("正在生成Excel文档,请稍候......");
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", this.txtYear.Text + "年" + this.txtMonth.Text + "月工资表");
            int rowIndex = 3;
            int colIndex = 1;

            excel.SetCellVal("A1", "起始日期:" + this.txtDateBegin.Text + " 截止日期:" + this.txtDateEnd.Text);
            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, true);
            FrmMsg.Hide();
            excel.Show();
        }
Esempio n. 28
0
        void btnExport_Click(object sender, EventArgs e)
        {
            FrmMsg.Show("正在生成Excel文档,请稍候......");
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", "订单完成报告");
            excel.SetCellVal("A2", "供应商:" + this.ctrlCompanyID.CompanyAbbName + " 订单日期:" + this.dtpDateBegin.Value.ToShortDateString() + "到" + this.dtpDateEnd.Value.ToShortDateString());
            int rowIndex = 3;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, true);
            FrmMsg.Hide();
            excel.Show();
        }
Esempio n. 29
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            FrmMsg.Show("正在生成打印文档,请稍候......");
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("C1", "产品加工单价");
            excel.SetCellVal("A3", "币种:" + this.ctrlMoneyTypeID.MoneyTypeName
                             + "   结算方式:" + this.ctrlSettleTypeID.SettleTypeName
                             + "   单价类型:" + this.ctrlPriceTypeID.PriceTypeName);
            int rowIndex = 6;
            int colIndex = 1;

            excel.ImportGridData(this.dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(6, 1, rowIndex, colIndex);
            excel.Show();
            FrmMsg.Hide();
        }
Esempio n. 30
0
        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.ctrlBetweenDate.DateBegin.ToShortDateString() + "到" + this.ctrlBetweenDate.DateEnd.ToShortDateString());
            int          rowIndex = 3;
            int          colIndex = 1;
            DataGridView dgrdv    = (DataGridView)this.tabMain.SelectedTab.Controls[0];

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            excel.SetRangeAutoFit(3, 1, rowIndex, colIndex, true, true);
            FrmMsg.Hide();
            excel.Show();
        }