////catagorySet赋值:其他费用 //private void GetCatagorySetValues_Other(DataTable dt, ref ProjectCostCatagorySet catagorySet) //{ // ExcelHelper excel = new ExcelHelper(); // DataView dv = dt.DefaultView; // int[] topcell = excel.CellindexContain(dt, "项目名称"); // int? c_sum = excel.ColumnIndexContain(dt, "合价", topcell[0]); // int col = Convert.ToInt32(c_sum); // int? r_xmjs_dl = excel.RowIndexContain(dt, "项目管理经费(电缆工程)", topcell[1]); // int? r_xmjs_fdl = excel.RowIndexContain(dt, "项目管理经费(非电缆工程)", topcell[1]); // int? r_xmjs_zb = excel.RowIndexContain(dt, "招标费", topcell[1]); // int? r_jl_dl = excel.RowIndexContain(dt, "监理费(电缆工程)", topcell[1]); // int? r_jl_fdl = excel.RowIndexContain(dt, "监理费(非电缆工程)", topcell[1]); // int? r_qq_dl = excel.RowIndexContain(dt, "项目前期工作费(电缆工程)", topcell[1]); // int? r_qq_fdl = excel.RowIndexContain(dt, "项目前期工作费(非电缆工程)", topcell[1]); // int? r_jbsj_fpd = excel.RowIndexContain(dt, "基本设计费(非配电站工程)", topcell[1]); // int? r_sgtys = excel.RowIndexContain(dt, "施工图预算编制费", topcell[1]); // int? r_jgtys = excel.RowIndexContain(dt, "竣工图文件编制费", topcell[1]); // int? r_cswj = excel.RowIndexContain(dt, "初步设计文件评审费", topcell[1]); // int? r_sgtwjsc = excel.RowIndexContain(dt, "施工图文件审查费", topcell[1]); // int? r_xmhpj_dl = excel.RowIndexContain(dt, "项目后评价费(电缆工程)", topcell[1]); // int? r_xmhpj_fdl = excel.RowIndexContain(dt, "项目后评价费(非电缆工程)", topcell[1]); // int? r_gcjs_dl = excel.RowIndexContain(dt, "工程结算审查费(电缆工程)", topcell[1]); // int? r_gcjs_fdl = excel.RowIndexContain(dt, "工程结算审查费(非电缆工程)", topcell[1]); // int? r_jsjc_dl = excel.RowIndexContain(dt, "工程建设检测费(电缆工程)", topcell[1]); // int? r_jsjc_fdl = excel.RowIndexContain(dt, "工程建设检测费(非电缆工程)", topcell[1]); // //赋值开始 // string xmjs_dl, xmjs_fdl, xmjs_zb, jl_dl, jl_fdl, qq_dl, qq_fdl, jbsj_fpd, sgtys, jgtys, cswj, sgtwjsc, xmhpj_dl, xmhpj_fdl, gcjs_dl, gcjs_fdl, jsjc_dl, jsjc_fdl; // try // { // xmjs_dl = dv[Convert.ToInt32(r_xmjs_dl)][col].ToString(); // xmjs_fdl = dv[Convert.ToInt32(r_xmjs_fdl)][col].ToString(); // xmjs_zb = dv[Convert.ToInt32(r_xmjs_zb)][col].ToString(); // jl_dl = dv[Convert.ToInt32(r_jl_dl)][col].ToString(); // jl_fdl = dv[Convert.ToInt32(r_jl_fdl)][col].ToString(); // qq_dl = dv[Convert.ToInt32(r_qq_dl)][col].ToString(); // qq_fdl = dv[Convert.ToInt32(r_qq_fdl)][col].ToString(); // jbsj_fpd = dv[Convert.ToInt32(r_jbsj_fpd)][col].ToString(); // sgtys = dv[Convert.ToInt32(r_sgtys)][col].ToString(); // jgtys = dv[Convert.ToInt32(r_jgtys)][col].ToString(); // cswj = dv[Convert.ToInt32(r_cswj)][col].ToString(); // sgtwjsc = dv[Convert.ToInt32(r_sgtwjsc)][col].ToString(); // xmhpj_dl = dv[Convert.ToInt32(r_xmhpj_dl)][col].ToString(); // xmhpj_fdl = dv[Convert.ToInt32(r_xmhpj_fdl)][col].ToString(); // gcjs_dl = dv[Convert.ToInt32(r_gcjs_dl)][col].ToString(); // gcjs_fdl = dv[Convert.ToInt32(r_gcjs_fdl)][col].ToString(); // jsjc_dl = dv[Convert.ToInt32(r_jsjc_dl)][col].ToString(); // jsjc_fdl = dv[Convert.ToInt32(r_jsjc_fdl)][col].ToString(); // //string转换int // catagorySet.pcc_other_xmgl.costValue = (string.IsNullOrEmpty(xmjs_dl) ? 0 : Convert.ToDouble(xmjs_dl)) + (string.IsNullOrEmpty(xmjs_fdl) ? 0 : Convert.ToDouble(xmjs_fdl)); // catagorySet.pcc_other_zb.costValue = string.IsNullOrEmpty(xmjs_zb) ? 0 : Convert.ToDouble(xmjs_zb); // catagorySet.pcc_other_gcjl.costValue = (string.IsNullOrEmpty(jl_dl) ? 0 : Convert.ToDouble(jl_dl)) + (string.IsNullOrEmpty(jl_fdl) ? 0 : Convert.ToDouble(jl_fdl)); // catagorySet.pcc_other_kc.costValue = (string.IsNullOrEmpty(qq_dl) ? 0 : Convert.ToDouble(qq_dl)) + (string.IsNullOrEmpty(qq_fdl) ? 0 : Convert.ToDouble(qq_fdl)); // //工程设计费=基本设计费+施工图预算编制费+竣工图文件编制费 // catagorySet.pcc_other_sj.costValue = (string.IsNullOrEmpty(jbsj_fpd) ? 0 : Convert.ToDouble(jbsj_fpd)) + (string.IsNullOrEmpty(sgtys) ? 0 : Convert.ToDouble(sgtys)) + (string.IsNullOrEmpty(jgtys) ? 0 : Convert.ToDouble(jgtys)); // //2个评审 // catagorySet.pcc_other_ps.costValue = (string.IsNullOrEmpty(cswj) ? 0 : Convert.ToDouble(cswj)) + (string.IsNullOrEmpty(sgtwjsc) ? 0 : Convert.ToDouble(sgtwjsc)); // //2个后评价 // catagorySet.pcc_other_hpj.costValue = (string.IsNullOrEmpty(xmhpj_dl) ? 0 : Convert.ToDouble(xmhpj_dl)) + (string.IsNullOrEmpty(xmhpj_fdl) ? 0 : Convert.ToDouble(xmhpj_fdl)); // //技术经济标准编制管理费=2个结算审查 // catagorySet.pcc_other_bzbz.costValue = (string.IsNullOrEmpty(gcjs_dl) ? 0 : Convert.ToDouble(gcjs_dl)) + (string.IsNullOrEmpty(gcjs_fdl) ? 0 : Convert.ToDouble(gcjs_fdl)); // //工程建设监督检测费 // catagorySet.pcc_other_jdjc.costValue = (string.IsNullOrEmpty(jsjc_dl) ? 0 : Convert.ToDouble(jsjc_dl)) + (string.IsNullOrEmpty(jsjc_fdl) ? 0 : Convert.ToDouble(jsjc_fdl)); // } // catch (Exception e) // { // this.Condition = "无法生成"; // this.Comment = e.Message; // } //} //catagorySet赋值:其他费用 private void GetCatagorySetValues_Other(DataSet ds, ref ProjectCostCatagorySet catagorySet) { ExcelHelper excel = new ExcelHelper(); string xmjs_dl = "", xmjs_fdl = "", xmjs_zb = "", jl_dl = "", jl_fdl = "", qq_dl = "", qq_fdl = "", jbsj_fpd = "", sgtys = "", jgtys = "", cswj = "", sgtwjsc = "", xmhpj_dl = "", xmhpj_fdl = "", gcjs_dl = "", gcjs_fdl = "", jsjc_dl = "", jsjc_fdl = "", jl = "", xmjs = "", gckc = "", gcsjf = ""; string sjwjps = "", bzbz = "", jsjc = ""; foreach (DataTable dt in ds.Tables) { if (!dt.TableName.Contains("其他费用")) { continue; } DataView dv = dt.DefaultView; int[] topcell = excel.CellindexContain(dt, "项目名称"); int? c_sum = excel.ColumnIndexContain(dt, "合价", topcell[0]); int col = Convert.ToInt32(c_sum); int? r_xmjs_dl = excel.RowIndexContain(dt, "项目管理经费(电缆工程)", topcell[1]); int? r_xmjs_fdl = excel.RowIndexContain(dt, "项目管理经费(非电缆工程)", topcell[1]); int? r_xmjs_zb = excel.RowIndexContain(dt, "招标费", topcell[1]); int? r_jl_dl = excel.RowIndexContain(dt, "监理费(电缆工程)", topcell[1]); int? r_jl_fdl = excel.RowIndexContain(dt, "监理费(非电缆工程)", topcell[1]); //勘察 int?r_qq_dl = excel.RowIndexContain(dt, "项目前期工作费(电缆工程)", topcell[1]); int?r_qq_fdl = excel.RowIndexContain(dt, "项目前期工作费(非电缆工程)", topcell[1]); int?r_gckc = excel.RowIndex(dt, "工程勘察费", topcell[1]); //设计 int?r_jbsj_fpd = excel.RowIndexContain(dt, "基本设计费(非配电站工程)", topcell[1]); int?r_sgtys = excel.RowIndexContain(dt, "施工图预算编制费", topcell[1]); int?r_jgtys = excel.RowIndexContain(dt, "竣工图文件编制费", topcell[1]); int?r_gcsjf = excel.RowIndex(dt, "工程设计费", topcell[1]); //评审 int?r_cswj = excel.RowIndexContain(dt, "初步设计文件评审费", topcell[1]); int?r_sgtwjsc = excel.RowIndexContain(dt, "施工图文件审查费", topcell[1]); int?r_sjwjps = excel.RowIndexContain(dt, "设计文件评审费", topcell[1]); int?r_xmhpj_dl = excel.RowIndexContain(dt, "项目后评价费(电缆工程)", topcell[1]); int?r_xmhpj_fdl = excel.RowIndexContain(dt, "项目后评价费(非电缆工程)", topcell[1]); //技术经济标准编制管理费 int?r_gcjs_dl = excel.RowIndexContain(dt, "工程结算审查费(电缆工程)", topcell[1]); int?r_gcjs_fdl = excel.RowIndexContain(dt, "工程结算审查费(非电缆工程)", topcell[1]); int?r_bzbz = excel.RowIndexContain(dt, "技术经济标准编制管理费", topcell[1]); int?r_jsjc_dl = excel.RowIndexContain(dt, "工程建设检测费(电缆工程)", topcell[1]); int?r_jsjc_fdl = excel.RowIndexContain(dt, "工程建设检测费(非电缆工程)", topcell[1]); int?r_jsjc = excel.RowIndexContain(dt, "工程建设监督检测费", topcell[1]); //debug---- int?r_xmjs = excel.RowIndex(dt, "项目管理经费", topcell[1]); //---- //debug-------- int?r_jl = excel.RowIndexContain(dt, "工程监理费", topcell[1]); //---------------- xmjs_dl = (r_xmjs_dl is null) ? xmjs_dl : dv[Convert.ToInt32(r_xmjs_dl)][col].ToString(); xmjs_fdl = (r_xmjs_fdl is null) ? xmjs_fdl : dv[Convert.ToInt32(r_xmjs_fdl)][col].ToString(); xmjs_zb = (r_xmjs_zb is null) ? xmjs_zb : dv[Convert.ToInt32(r_xmjs_zb)][col].ToString(); xmjs = (r_xmjs is null) ? xmjs : dv[Convert.ToInt32(r_xmjs)][col].ToString(); jl_dl = (r_jl_dl is null) ? jl_dl : dv[Convert.ToInt32(r_jl_dl)][col].ToString(); jl_fdl = (r_jl_fdl is null) ? jl_fdl : dv[Convert.ToInt32(r_jl_fdl)][col].ToString(); jl = (r_jl is null) ? jl : dv[Convert.ToInt32(r_jl)][col].ToString(); qq_dl = (r_qq_dl is null) ? qq_dl : dv[Convert.ToInt32(r_qq_dl)][col].ToString(); qq_fdl = (r_qq_fdl is null) ? qq_fdl : dv[Convert.ToInt32(r_qq_fdl)][col].ToString(); jbsj_fpd = (r_jbsj_fpd is null) ? jbsj_fpd : dv[Convert.ToInt32(r_jbsj_fpd)][col].ToString(); sgtys = (r_sgtys is null) ? sgtys : dv[Convert.ToInt32(r_sgtys)][col].ToString(); jgtys = (r_jgtys is null) ? jgtys : dv[Convert.ToInt32(r_jgtys)][col].ToString(); cswj = (r_cswj is null) ? cswj : dv[Convert.ToInt32(r_cswj)][col].ToString(); sgtwjsc = (r_sgtwjsc is null) ? sgtwjsc : dv[Convert.ToInt32(r_sgtwjsc)][col].ToString(); xmhpj_dl = (r_xmhpj_dl is null) ? xmhpj_dl : dv[Convert.ToInt32(r_xmhpj_dl)][col].ToString(); xmhpj_fdl = (r_xmhpj_fdl is null) ? xmhpj_fdl : dv[Convert.ToInt32(r_xmhpj_fdl)][col].ToString(); gcjs_dl = (r_gcjs_dl is null) ? gcjs_dl : dv[Convert.ToInt32(r_gcjs_dl)][col].ToString(); gcjs_fdl = (r_gcjs_fdl is null) ? gcjs_fdl : dv[Convert.ToInt32(r_gcjs_fdl)][col].ToString(); jsjc_dl = (r_jsjc_dl is null) ? jsjc_dl : dv[Convert.ToInt32(r_jsjc_dl)][col].ToString(); jsjc_fdl = (r_jsjc_fdl is null) ? jsjc_fdl : dv[Convert.ToInt32(r_jsjc_fdl)][col].ToString(); gckc = (r_gckc is null) ? gckc : dv[Convert.ToInt32(r_gckc)][col].ToString(); gcsjf = (r_gcsjf is null) ? gcsjf : dv[Convert.ToInt32(r_gcsjf)][col].ToString(); sjwjps = (r_sjwjps is null) ? sjwjps : dv[Convert.ToInt32(r_sjwjps)][col].ToString(); bzbz = (r_bzbz is null) ? bzbz : dv[Convert.ToInt32(r_bzbz)][col].ToString(); jsjc = (r_jsjc is null) ? jsjc : dv[Convert.ToInt32(r_jsjc)][col].ToString(); } //赋值开始 try { //string转换int catagorySet.pcc_other_xmgl.costValue = (string.IsNullOrEmpty(xmjs_dl) ? 0 : Convert.ToDouble(xmjs_dl)) + (string.IsNullOrEmpty(xmjs_fdl) ? 0 : Convert.ToDouble(xmjs_fdl)) + (string.IsNullOrEmpty(xmjs) ? 0 : Convert.ToDouble(xmjs)); catagorySet.pcc_other_zb.costValue = string.IsNullOrEmpty(xmjs_zb) ? 0 : Convert.ToDouble(xmjs_zb); catagorySet.pcc_other_gcjl.costValue = (string.IsNullOrEmpty(jl_dl) ? 0 : Convert.ToDouble(jl_dl)) + (string.IsNullOrEmpty(jl_fdl) ? 0 : Convert.ToDouble(jl_fdl)) + (string.IsNullOrEmpty(jl) ? 0 : Convert.ToDouble(jl)); //勘察 catagorySet.pcc_other_kc.costValue = (string.IsNullOrEmpty(qq_dl) ? 0 : Convert.ToDouble(qq_dl)) + (string.IsNullOrEmpty(qq_fdl) ? 0 : Convert.ToDouble(qq_fdl)) + (string.IsNullOrEmpty(gckc) ? 0 : Convert.ToDouble(gckc)); //工程设计费=基本设计费+施工图预算编制费+竣工图文件编制费 catagorySet.pcc_other_sj.costValue = (string.IsNullOrEmpty(jbsj_fpd) ? 0 : Convert.ToDouble(jbsj_fpd)) + (string.IsNullOrEmpty(sgtys) ? 0 : Convert.ToDouble(sgtys)) + (string.IsNullOrEmpty(jgtys) ? 0 : Convert.ToDouble(jgtys)) + (string.IsNullOrEmpty(gcsjf) ? 0 : Convert.ToDouble(gcsjf)); //2个评审 catagorySet.pcc_other_ps.costValue = (string.IsNullOrEmpty(cswj) ? 0 : Convert.ToDouble(cswj)) + (string.IsNullOrEmpty(sgtwjsc) ? 0 : Convert.ToDouble(sgtwjsc)) + (string.IsNullOrEmpty(sjwjps) ? 0 : Convert.ToDouble(sjwjps)); //2个后评价 catagorySet.pcc_other_hpj.costValue = (string.IsNullOrEmpty(xmhpj_dl) ? 0 : Convert.ToDouble(xmhpj_dl)) + (string.IsNullOrEmpty(xmhpj_fdl) ? 0 : Convert.ToDouble(xmhpj_fdl)); //技术经济标准编制管理费=2个结算审查 catagorySet.pcc_other_bzbz.costValue = (string.IsNullOrEmpty(gcjs_dl) ? 0 : Convert.ToDouble(gcjs_dl)) + (string.IsNullOrEmpty(gcjs_fdl) ? 0 : Convert.ToDouble(gcjs_fdl)) + (string.IsNullOrEmpty(bzbz) ? 0 : Convert.ToDouble(bzbz)); //工程建设监督检测费 catagorySet.pcc_other_jdjc.costValue = (string.IsNullOrEmpty(jsjc_dl) ? 0 : Convert.ToDouble(jsjc_dl)) + (string.IsNullOrEmpty(jsjc_fdl) ? 0 : Convert.ToDouble(jsjc_fdl)) + (string.IsNullOrEmpty(jsjc) ? 0 : Convert.ToDouble(jsjc)); } catch (Exception e) { this.Comment = e.Message; } }
//为financdata赋值 public void GetDataToFinanceData(ProjectClass proc, ProjectCostCatagorySet catagorySet) { foreach (ProjectEstimateViewModel pevm in EstimateViewModels) { pevm.ProjectName = proc.ProjectName; pevm.ProjectCode = proc.ProjectCode; if (pevm is ProjectTotalEstimateViewModel) { ((ProjectTotalEstimateViewModel)pevm).EstimateNumber = catagorySet.pcc_all.costValue.ToString(); continue; } switch (pevm.ExpanseCategory) { case "10KV(含20KV)及以下基建项目": pevm.EstimateNumber = catagorySet.pcc_all.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—配电站(开关站)工程—建筑工程": pevm.EstimateNumber = catagorySet.pcc_pd_jz.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—配电站(开关站)工程—安装工程": pevm.EstimateNumber = catagorySet.pcc_pd_az.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—配电站(开关站)工程—设备购置": pevm.EstimateNumber = catagorySet.pcc_pd_sb.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—通信及调度自动化—建筑工程": pevm.EstimateNumber = catagorySet.pcc_tx_jz.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—通信及调度自动化—安装工程": pevm.EstimateNumber = catagorySet.pcc_tx_az.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—通信及调度自动化—设备购置": pevm.EstimateNumber = catagorySet.pcc_tx_sb.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—架空线路工程—架空线路本体工程": pevm.EstimateNumber = catagorySet.pcc_jk.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—电缆线路工程—电缆本体工程": pevm.EstimateNumber = catagorySet.pcc_dl.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—建设场地征用及清理费": pevm.EstimateNumber = catagorySet.pcc_other_cd.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设管理费—项目管理经费": pevm.EstimateNumber = catagorySet.pcc_other_xmgl.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设管理费—项目管理经费—其中:业务招待费": pevm.EstimateNumber = catagorySet.pcc_other_zd.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设管理费—招标费": pevm.EstimateNumber = catagorySet.pcc_other_zb.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设管理费—工程监理费": pevm.EstimateNumber = catagorySet.pcc_other_gcjl.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设技术服务费—工程勘察费": pevm.EstimateNumber = catagorySet.pcc_other_kc.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设技术服务费—工程设计费": pevm.EstimateNumber = catagorySet.pcc_other_sj.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设技术服务费—设计文件评审费": pevm.EstimateNumber = catagorySet.pcc_other_ps.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设技术服务费—项目后评价费": pevm.EstimateNumber = catagorySet.pcc_other_hpj.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—项目建设技术服务费—技术经济标准编制管理费": pevm.EstimateNumber = catagorySet.pcc_other_bzbz.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—工程建设监督检测费": pevm.EstimateNumber = catagorySet.pcc_other_jdjc.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—生产准备费": pevm.EstimateNumber = catagorySet.pcc_other_sczb.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—其他费用—基本预备费": pevm.EstimateNumber = catagorySet.pcc_other_jbyb.costValue.ToString(); break; case "10KV(含20KV)及以下基建项目—建设期贷款利息": pevm.EstimateNumber = catagorySet.pcc_other_dklx.costValue.ToString(); break; default: System.Windows.Forms.MessageBox.Show("错误:未能识别的费用类别——" + pevm.ExpanseCategory + pevm.WBSCode); break; } } string temp = TotalEstimateViewModel.TotalInvestmentWithTax; //System.Windows.MessageBox.Show(MinWithoutRate().ToString()+" "+MaxWithoutRate().ToString()); }
private void GetCatagorySetValues(DataTable dt, EstinateOverViewTableCellsSet cellsSet, ref ProjectCostCatagorySet catagorySet) { DataView dv = dt.DefaultView; int c_jz = Convert.ToInt32(cellsSet.JZGC_Cell.cell.Column); //建筑列 int c_sb = Convert.ToInt32(cellsSet.SBGZ_Cell.cell.Column); //设备列 int c_az = Convert.ToInt32(cellsSet.AZGC_Cell.cell.Column); //安装列 int c_other = Convert.ToInt32(cellsSet.Other_Cell_X.cell.Column); //其他列 int cell_hj = Convert.ToInt32(cellsSet.HJ_Cell.cell.Column); //合计列 catagorySet = new ProjectCostCatagorySet(); //配电站3层 if (cellsSet.PDZ_Cell.cell.Row is null) { } else { int r = Convert.ToInt32(cellsSet.PDZ_Cell.cell.Row); string pd_jz = ""; string pd_az = ""; string pd_sb = ""; pd_az = dv[r][c_az].ToString(); pd_jz = dv[r][c_jz].ToString(); pd_sb = dv[r][c_sb].ToString(); catagorySet.pcc_pd_az.costValue = (string.IsNullOrEmpty(pd_az) ? 0 : Convert.ToDouble(pd_az)); catagorySet.pcc_pd_jz.costValue = (string.IsNullOrEmpty(pd_jz) ? 0 : Convert.ToDouble(pd_jz)); catagorySet.pcc_pd_sb.costValue = (string.IsNullOrEmpty(pd_sb) ? 0 : Convert.ToDouble(pd_sb)); } //通信自动化3层 if (!(cellsSet.TXAuto_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.TXAuto_Cell.cell.Row); string tx_jz = ""; string tx_az = ""; string tx_sb = ""; tx_az = dv[r][c_az].ToString(); tx_jz = dv[r][c_jz].ToString(); tx_sb = dv[r][c_sb].ToString(); catagorySet.pcc_pd_az.costValue = (string.IsNullOrEmpty(tx_az) ? 0 : Convert.ToDouble(tx_az)); catagorySet.pcc_pd_jz.costValue = (string.IsNullOrEmpty(tx_jz) ? 0 : Convert.ToDouble(tx_jz)); catagorySet.pcc_pd_sb.costValue = (string.IsNullOrEmpty(tx_sb) ? 0 : Convert.ToDouble(tx_sb)); } //架空线路1层 if (!(cellsSet.JKXL_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.JKXL_Cell.cell.Row); string jk_hj = ""; jk_hj = dv[r][cell_hj].ToString(); catagorySet.pcc_jk.costValue = (string.IsNullOrEmpty(jk_hj) ? 0 : Convert.ToDouble(jk_hj)); } //电缆线路1层 if (!(cellsSet.DLXL_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.DLXL_Cell.cell.Row); string dl_hj = ""; dl_hj = dv[r][cell_hj].ToString(); catagorySet.pcc_dl.costValue = (string.IsNullOrEmpty(dl_hj) ? 0 : Convert.ToDouble(dl_hj)); } //年价差。 if (!(cellsSet.NJC_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.NJC_Cell.cell.Row); string njc_hj = ""; njc_hj = dv[r][cell_hj].ToString(); njc = (string.IsNullOrEmpty(njc_hj) ? 0 : Convert.ToDouble(njc_hj)); } //建设场地征用及清理费 if (!(cellsSet.Other_JSCDQL_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.Other_JSCDQL_Cell.cell.Row); string jscd = ""; jscd = dv[r][cell_hj].ToString(); catagorySet.pcc_other_cd.costValue = (string.IsNullOrEmpty(jscd) ? 0 : Convert.ToDouble(jscd)); } //生产准备费=生产准备费(电缆工程)+生产准备费(非电缆工程)+基本预备费+生产准备费 string sczb_dl = ""; string sczb_fdl = ""; string sczb_jbyb = ""; string sczb = ""; if (!(cellsSet.Other_SCZB_DL_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.Other_SCZB_DL_Cell.cell.Row); sczb_dl = dv[r][cell_hj].ToString(); } if (!(cellsSet.Other_SCZB_FDL_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.Other_SCZB_FDL_Cell.cell.Row); sczb_fdl = dv[r][cell_hj].ToString(); } if (!(cellsSet.JBYB_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.JBYB_Cell.cell.Row); sczb_jbyb = dv[r][cell_hj].ToString(); } if (!(cellsSet.Other_SCZB_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.Other_SCZB_Cell.cell.Row); sczb = dv[r][cell_hj].ToString(); } catagorySet.pcc_other_sczb.costValue = ((string.IsNullOrEmpty(sczb_dl) ? 0 : Convert.ToDouble(sczb_dl)) + (string.IsNullOrEmpty(sczb_fdl) ? 0 : Convert.ToDouble(sczb_fdl)) + (string.IsNullOrEmpty(sczb_jbyb) ? 0 : Convert.ToDouble(sczb_jbyb)) + (string.IsNullOrEmpty(sczb) ? 0 : Convert.ToDouble(sczb))); //贷款利息 if (!(cellsSet.DKLX_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.DKLX_Cell.cell.Row); string dklx = ""; dklx = dv[r][cell_hj].ToString(); catagorySet.pcc_other_dklx.costValue = (string.IsNullOrEmpty(dklx) ? 0 : Convert.ToDouble(dklx)); } //动态投资 if (!(cellsSet.GCDT_Cell.cell.Row is null)) { int r = Convert.ToInt32(cellsSet.GCDT_Cell.cell.Row); string all = ""; all = dv[r][cell_hj].ToString(); catagorySet.pcc_all.costValue = (string.IsNullOrEmpty(all) ? 0 : Convert.ToDouble(all)); } if (isWanYuan == true || ((isWanYuan == null) & catagorySet.pcc_all.costValue < 10000)) { catagorySet.pcc_all.costValue *= 10000; catagorySet.pcc_dl.costValue *= 10000; catagorySet.pcc_jk.costValue *= 10000; catagorySet.pcc_pd_az.costValue *= 10000; catagorySet.pcc_pd_jz.costValue *= 10000; catagorySet.pcc_pd_sb.costValue *= 10000; catagorySet.pcc_tx_az.costValue *= 10000; catagorySet.pcc_tx_jz.costValue *= 10000; catagorySet.pcc_tx_sb.costValue *= 10000; njc *= 10000; catagorySet.pcc_other_cd.costValue *= 10000; catagorySet.pcc_other_sczb.costValue *= 10000; catagorySet.pcc_other_dklx.costValue *= 10000; } }