Exemplo n.º 1
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();
        }
Exemplo n.º 2
0
        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();
            }
        }
Exemplo n.º 3
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.PrdEntity.PrdCode
                             + "      产品名称:" + this.PrdEntity.PrdName
                             + "      产品规格:" + this.PrdEntity.PrdSpec
                             );

            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();
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
0
        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("成功保存当前设置");
        }
Exemplo n.º 6
0
 void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     FrmMsg.Show("正在下载中,请稍候.....");
     this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "PackingSheet.xlt",
                                  "生产下单格式.xlt");
     FrmMsg.Hide();
 }
Exemplo n.º 7
0
 void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     FrmMsg.Show("正在下载中,请稍候.....");
     this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "MtrBuyReceiveNote.xlt",
                                  "采购收货单格式.xlt");
     FrmMsg.Hide();
 }
Exemplo n.º 8
0
        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);
            }
        }
Exemplo n.º 9
0
 void lnkDowload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     FrmMsg.Show("正在下载中,请稍候.....");
     this.fileHelper.DownloadFile(JERPData.ServerParameter.TempletFolder + "ExpressReconciliation.xlt",
                                  "代收对账单格式.xlt");
     FrmMsg.Hide();
 }
Exemplo n.º 10
0
 void btnExplore_Click(object sender, EventArgs e)
 {
     FrmMsg.Show("正在生成打印文档,请稍候......");
     this.SaveAMT();
     long[] IDList = new long[] { this.ReconciliationID };
     this.printerhelper.ExportToExcel(IDList);
     FrmMsg.Hide();
 }
Exemplo n.º 11
0
        void New_MouseClick(object sender, MouseEventArgs e)
        {
            ItemInfo_SelfNews news = sender as ItemInfo_SelfNews;
            DataRow           dr   = news.NewDr;
            string            note = dr["note"].ToString().Replace(" ", "").Replace((char)13, (char)0).Replace((char)10, (char)0);

            note = note.Length > 100 ? note.Substring(0, 100) : note;
            FrmMsg.Show(note, "提示");
        }
Exemplo n.º 12
0
        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();
        }
Exemplo n.º 13
0
 public void OnDownloadUpdated(IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback)
 {
     Console.WriteLine("[{0}] {1} {2}/{3}", downloadItem.Id, downloadItem.SuggestedFileName, downloadItem.ReceivedBytes, downloadItem.TotalBytes);
     if (downloadItem.IsComplete)
     {
         FrmMsg.Show(MsgKind.ok, "提示", "文件下载成功");
         Console.WriteLine("[{0}] File:{1} OK {2}/{3}", downloadItem.Id, downloadItem.FullPath, downloadItem.ReceivedBytes, downloadItem.TotalBytes);
     }
 }
Exemplo n.º 14
0
        /// <summary>
        /// 关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ibtnClose_Click(object sender, EventArgs e)
        {
            DialogResult result = FrmMsg.Show(MsgKind.yes_no, "提示", "是否关闭DNA网络化实验室系统?");

            // DialogResult result = MessageBox.Show("是否关闭DNA网络化实验室系统?", "提示",MessageBoxButtons.YesNo);
            if (result == DialogResult.Yes)
            {
                this.Close();
            }
        }
Exemplo n.º 15
0
        private void itemtitle_MouseClick(object sender, MouseEventArgs e)
        {
            ItemTitle_Button btn = sender as ItemTitle_Button;

            switch (btn.ItemstrTitle)
            {
            case "公告通知":
                FrmMsg.Show("公告通知", "提示");
                break;
            }
        }
Exemplo n.º 16
0
        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();
        }
Exemplo n.º 17
0
 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();
 }
Exemplo n.º 18
0
 //用户登录
 private void imageButton_Login_Click(object sender, EventArgs e)
 {
     if (comboBox_UserName.Text == "" || textBox_PassWord.Text == "")
     {
         FrmMsg.Show(MsgKind.ok, "提示", "账号和密码不能为空!");
         return;
     }
     if (userLoginClick != null)
     {
         userLoginClick(comboBox_UserName.Text, textBox_PassWord.Text);
     }
 }
Exemplo n.º 19
0
        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();
        }
Exemplo n.º 20
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();
 }
Exemplo n.º 21
0
 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();
 }
Exemplo n.º 22
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();
        }
Exemplo n.º 23
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();
 }
Exemplo n.º 24
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();
        }
Exemplo n.º 25
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();
        }
Exemplo n.º 26
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();
        }
Exemplo n.º 27
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();
        }
Exemplo n.º 28
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();
        }
Exemplo n.º 29
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();
        }
Exemplo n.º 30
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();
        }