private void txtBind(int buid) { BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(buid); if (bi != null) { txtBIAppReaCon.Text = bi.BIAppReaCon; // txtProName.Text = bi ddlProProper.SelectedValue = bi.BIAttr; txtBICharger.Text = bi.BICharger; txtItemNumber.Text = bi.BICode.ToString(); txtBIExpGistExp.Text = bi.BIExpGistExp; ddlFunSub.SelectedValue = bi.BIFunSub; txtBILongGoal.Text = bi.BILongGoal; txtBIOthExpProb.Text = bi.BIOthExpProb; ddlBIPlanHz.Text = bi.BIPlanHz.ToString(); //ddlPayProType.SelectedValue = bi.BIProType; txtBIStaTime.Text = bi.BIStaTime.ToString("yyyy-MM-dd"); txtBIEndTime.Text = bi.BIEndTime.ToString("yyyy-MM-dd"); txtBITime.Text = bi.BIReportTime.ToString("yyyy-MM-dd"); txtBIYearGoal.Text = bi.BIYearGoal; ddlPayProType.SelectedValue = bi.PPID.ToString(); hidPPID.Value = bi.PPID.ToString(); txtProName.Text = bi.BIProName.ToString(); txtProDesc.Text = bi.BIProDescrip.ToString(); txtBIMon.Text = bi.BIMon.ToString(); txtBackReason.Text = bi.BICause; txtBudConNumber.Text = bi.BIConNum.ToString(); Hiddepid.Value = bi.DepID.ToString(); ddlProType.SelectedValue = bi.BIProCategory; hidSta.Value = bi.BudSta; } }
protected void btnReturn_Click(object sender, EventArgs e) { BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(budid); bi.BudSta = "退回"; bi.BIConNum = ParseUtil.ToDecimal(txtBudConNumber.Text.Trim(), 0); bi.BICause = txtBackReason.Text.Trim(); BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = budid; hisbi.BIAppConMon = 0;// decimal.Parse(txtBudConNumber.Text.Trim());审批控制金额,应该是预算控制数 hisbi.BIAppReaCon = txtBIAppReaCon.Text.Trim(); hisbi.BIAttr = ddlProProper.SelectedValue; hisbi.BIBudSta = "等下对接"; //Session[Constant.UserName].ToString(); hisbi.BICause = txtBackReason.Text.Trim(); //退回原因 hisbi.BICharger = txtBICharger.Text.Trim(); hisbi.BICode = txtItemNumber.Text.Trim(); //项目编号 hisbi.BIEndTime = DateTime.Parse(txtBIEndTime.Text.Trim()); hisbi.BIExpGistExp = txtBIExpGistExp.Text.Trim(); hisbi.BIConNum = ParseUtil.ToDecimal(txtBudConNumber.Text, 0); hisbi.BIFinAllo = 0; // decimal.Parse(txtBudConNumber.Text.Trim());财政拨款 hisbi.BIFunSub = ddlFunSub.Text.Trim(); hisbi.BILastYearCarry = 0; // decimal.Parse(txtBudConNumber.Text.Trim());上年结账 hisbi.BILongGoal = txtBILongGoal.Text.Trim(); hisbi.BIMon = common.IntSafeConvert(txtBIMon.Text); //GetBIMon(coll.GetValues("txt4")); hisbi.BIMonSou = ""; //资金来源 hisbi.BIOthExpProb = txtBIOthExpProb.Text.Trim(); hisbi.BIOthFun = 0; // decimal.Parse(txtBudConNumber.Text.Trim());其他资金 hisbi.BIPlanHz = ddlBIPlanHz.SelectedValue; //项目频度 hisbi.BIProType = ddlPayProType.SelectedItem.Text; hisbi.BIStaTime = DateTime.Parse(txtBIStaTime.Text.Trim()); hisbi.BIYearGoal = txtBIYearGoal.Text.Trim(); hisbi.PPID = common.IntSafeConvert(ddlPayProType.SelectedValue); // hisbi.BudSta = "退回"; // hisbi.PIID = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID; //common.IntSafeConvert(ddlFunSub.SelectedValue);//yj hisbi.BIProName = txtProName.Text.Trim(); hisbi.BIReportTime = ParseUtil.ToDateTime(txtBITime.Text.Trim(), DateTime.Now); //hisbi.BIConNum = 0;//预算控制数 hisbi.BIProDescrip = txtProDesc.Text.Trim(); hisbi.DepID = common.IntSafeConvert(Hiddepid.Value); hisbi.BIProCategory = ddlProType.SelectedItem.Text; int flaid = BG_BudItemHisManager.AddBG_BudItemHis(hisbi).BudHisID; if (BGBudItemsManager.UpdBudItems(bi) && flaid > 0) { btnAppo.ForeColor = Color.Gray; btnAppo.Enabled = false; btnElimin.ForeColor = Color.Gray; btnElimin.Enabled = false; lblShowResult.Text = "项目已退回"; } else { lblShowResult.Text = "操作失败、请重试"; } }
protected void btnElimin_Click(object sender, EventArgs e) { string message = "被淘汰的项目不可以恢复,是否淘汰?"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(budid); bi.BudSta = "淘汰"; bi.BIConNum = ParseUtil.ToDecimal(txtBudConNumber.Text.Trim(), 0); bi.BICause = txtBackReason.Text.Trim(); if (BGBudItemsManager.UpdBudItems(bi)) { BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = budid; hisbi.BIAppConMon = bi.BIAppConMon; hisbi.BIAppReaCon = bi.BIAppReaCon; hisbi.BIAttr = bi.BIAttr; hisbi.BIBudSta = bi.BIBudSta; hisbi.BICause = bi.BICause; hisbi.BICharger = bi.BICharger; hisbi.BICode = bi.BICode; hisbi.BIEndTime = bi.BIEndTime; hisbi.BIExpGistExp = bi.BIExpGistExp; hisbi.BIFinAllo = bi.BIFinAllo; hisbi.BIFunSub = bi.BIFunSub; hisbi.BILastYearCarry = bi.BILastYearCarry; hisbi.BILongGoal = bi.BILongGoal; hisbi.BIMon = bi.BIMon; hisbi.BIMonSou = bi.BIMonSou; hisbi.BIOthExpProb = bi.BIOthExpProb; hisbi.BIOthFun = bi.BIOthFun; hisbi.BIPlanHz = bi.BIPlanHz; hisbi.BIProType = bi.BIProType; hisbi.BIStaTime = bi.BIStaTime; hisbi.BIYearGoal = bi.BIYearGoal; hisbi.PPID = bi.PPID; hisbi.BudSta = bi.BudSta; hisbi.PIID = bi.PIID; hisbi.BIProName = bi.BIProName; hisbi.BIReportTime = bi.BIReportTime; hisbi.BIConNum = bi.BIConNum; hisbi.BIProDescrip = bi.BIProDescrip; hisbi.DepID = bi.DepID; hisbi.BIProCategory = bi.BIProCategory; BG_BudItemHisManager.AddBG_BudItemHis(hisbi); btnAppo.ForeColor = Color.Gray; btnAppo.Enabled = false; btnReturn.ForeColor = Color.Gray; btnReturn.Enabled = false; lblShowResult.Text = "项目已淘汰"; } else { lblShowResult.Text = "操作失败、请重试"; } }
protected void btnAppo_Click(object sender, EventArgs e) { bool flag = BGBudItemsManager.UpdBudSta(budid, "审核通过"); if (flag) { BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(budid); BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = budid; hisbi.BIAppConMon = bi.BIAppConMon; hisbi.BIAppReaCon = bi.BIAppReaCon; hisbi.BIAttr = bi.BIAttr; hisbi.BIBudSta = bi.BIBudSta; hisbi.BICause = bi.BICause; hisbi.BICharger = bi.BICharger; hisbi.BICode = bi.BICode; hisbi.BIEndTime = bi.BIEndTime; hisbi.BIExpGistExp = bi.BIExpGistExp; hisbi.BIFinAllo = bi.BIFinAllo; hisbi.BIFunSub = bi.BIFunSub; hisbi.BILastYearCarry = bi.BILastYearCarry; hisbi.BILongGoal = bi.BILongGoal; hisbi.BIMon = bi.BIMon; hisbi.BIConNum = ParseUtil.ToDecimal(txtBudConNumber.Text, 0); hisbi.BIMonSou = bi.BIMonSou; hisbi.BIOthExpProb = bi.BIOthExpProb; hisbi.BIOthFun = bi.BIOthFun; hisbi.BIPlanHz = bi.BIPlanHz; hisbi.BIProType = bi.BIProType; hisbi.BIStaTime = bi.BIStaTime; hisbi.BIYearGoal = bi.BIYearGoal; hisbi.PPID = bi.PPID; hisbi.BudSta = bi.BudSta; hisbi.PIID = bi.PIID; hisbi.BIProName = bi.BIProName; hisbi.BIReportTime = bi.BIReportTime; hisbi.BIProDescrip = bi.BIProDescrip; hisbi.DepID = bi.DepID; hisbi.BIProCategory = bi.BIProCategory; BG_BudItemHisManager.AddBG_BudItemHis(hisbi); btnElimin.ForeColor = Color.Gray; btnElimin.Enabled = false; btnReturn.ForeColor = Color.Gray; btnReturn.Enabled = false; lblShowResult.Text = "项目上报成功"; } else { lblShowResult.Text = "操作失败、请重试"; } }
public void SubMit_Handler(int budId) { if (BGBudItemsManager.UpdBudSta(budId, "提交")) { Bind(); BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(budId); BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = budId; hisbi.BIAppConMon = bi.BIAppConMon; hisbi.BIAppReaCon = bi.BIAppReaCon; hisbi.BIAttr = bi.BIAttr; hisbi.BIBudSta = bi.BIBudSta; hisbi.BICause = bi.BICause; hisbi.BICharger = bi.BICharger; hisbi.BICode = bi.BICode; hisbi.BIEndTime = bi.BIEndTime; hisbi.BIExpGistExp = bi.BIExpGistExp; hisbi.BIFinAllo = bi.BIFinAllo; hisbi.BIFunSub = bi.BIFunSub; hisbi.BILastYearCarry = bi.BILastYearCarry; hisbi.BILongGoal = bi.BILongGoal; hisbi.BIMon = bi.BIMon; hisbi.BIMonSou = bi.BIMonSou; hisbi.BIOthExpProb = bi.BIOthExpProb; hisbi.BIOthFun = bi.BIOthFun; hisbi.BIPlanHz = bi.BIPlanHz; hisbi.BIProType = bi.BIProType; hisbi.BIStaTime = bi.BIStaTime; hisbi.BIYearGoal = bi.BIYearGoal; hisbi.PPID = bi.PPID; hisbi.BudSta = bi.BudSta; hisbi.PIID = bi.PIID; hisbi.BIProName = bi.BIProName; hisbi.BIReportTime = bi.BIReportTime; hisbi.BIConNum = bi.BIConNum; hisbi.BIProDescrip = bi.BIProDescrip; hisbi.DepID = bi.DepID; hisbi.BIProCategory = bi.BIProCategory; hisbi.BIYear = bi.BIYear; BG_BudItemHisManager.AddBG_BudItemHis(hisbi); } }
protected void btn_Click(object sender, EventArgs e) { //检查文件是否存在 if (fup.HasFile == false)//HasFile用来检查FileUpload是否有指定文件 { lbl.Text = "* 文件不存在或者已移动、请您重新选择Doc文件 "; return; } lbl.Text = string.Empty; string fileName = "\\" + fup.FileName; string savePath = Server.MapPath("~\\upload\\" + budid.ToString()); if (!Directory.Exists(savePath))//判断是否存在 { Directory.CreateDirectory(savePath); } savePath += common.SafeSql(fileName); fup.SaveAs(savePath); BG_BudAppendix bam = new BG_BudAppendix(); bam.BudID = budid; bam.ApTime = BGBudItemsManager.GetBudItemsByBudid(budid).BIStaTime; bam.ApName = common.SafeSql(Path.GetFileNameWithoutExtension(fup.FileName)); bam.APPath = savePath; if (BGBudAppendixManager.AddBudAppendix(bam)) { lbl.Text = "*添加成功"; repAnnexBind(budid); } else { lbl.Text = "*操作失败、请检查数据后重试"; } }
protected void btnUpd_Click(object sender, EventArgs e) { int bid = common.IntSafeConvert(Hidbuid.Value); BG_BudItems bi = BGBudItemsManager.GetBudItemsByBudid(bid); bi.BIAppReaCon = txtBIAppReaCon.Text.Trim(); bi.BIAttr = ddlProProper.SelectedValue; bi.BIBudSta = ""; //Session[Constant.UserName].ToString(); bi.BudSta = "未提交"; bi.BICharger = txtBICharger.Text.Trim(); //bi.BICode =txtItemNumber.Text.Trim(); bi.BIEndTime = DateTime.Parse(txtBIEndTime.Text.Trim()); bi.BIExpGistExp = txtBIExpGistExp.Text.Trim(); bi.BIFunSub = ddlFunSub.SelectedValue; bi.BILongGoal = txtBILongGoal.Text.Trim(); bi.BIOthExpProb = txtBIOthExpProb.Text.Trim(); bi.BIPlanHz = ddlBIPlanHz.SelectedValue; bi.BIProType = ddlPayProType.SelectedItem.Text; bi.BIStaTime = DateTime.Parse(txtBIStaTime.Text.Trim()); bi.BIYearGoal = txtBIYearGoal.Text.Trim(); bi.PPID = common.IntSafeConvert(ddlPayProType.SelectedValue); bi.BIProName = txtProName.Text.Trim(); bi.BIReportTime = ParseUtil.ToDateTime(txtBITime.Text.Trim(), DateTime.Now); // bi.BIConNum = 0; bi.BIProDescrip = txtProDesc.Text.Trim(); bi.BIProCategory = ddlProType.SelectedValue; decimal bimon = ParseUtil.ToDecimal(HidMonTotal.Value, 0); //GetBIMon(coll.GetValues("txt4")); bi.BIMon = bimon; int buid = bi.BudID; int depid = bi.DepID; int bcn = (int)ParseUtil.ToDecimal(txtBudConNumber.Text, 0); if (bcn != 0) { decimal bunconnum = bi.BIConNum; if (bunconnum < bimon) { lblShowResult.Text = "*预算金额超标!"; return; } } if (BGBudItemsManager.UpdBudItems(bi)) { string idStrs = BGBudCostProManager.GetDelIdsStr(buid); bool delFlag = BGBudCostProManager.DelBCPByIdStrs(idStrs); if (delFlag) { NameValueCollection coll = Request.Form; string selectVal = HidSelectVal.Value.TrimEnd(','); string[] arrs = selectVal.Split(','); string[] txt1 = coll.GetValues("txt1"); //行号 string[] txt2 = coll.GetValues("txt2"); //当前年度 string[] txt3 = arrs; //经济科目 string[] txt4 = coll.GetValues("txt4"); //总计 string[] txt5 = coll.GetValues("txt5"); //小计(财政拨款) string[] txt6 = coll.GetValues("txt6"); //小计(经费) string[] txt7 = coll.GetValues("txt7"); //内部开支(经费) string[] txt8 = coll.GetValues("txt8"); //外部拨款(经费) int rowCount = common.IntSafeConvert(HidRowCount.Value); bool flag = false; if (rowCount > 0) { for (int j = 0; j < rowCount; j++) { BG_BudCostPro bcp = new BG_BudCostPro(); bcp.BudID = buid; bcp.BCPCurrYear = common.IntSafeConvert(txt2[j]); bcp.BCPRemark = ""; bcp.PIID = common.IntSafeConvert(txt3[j]); bcp.BCPTotal = ParseUtil.ToDecimal(txt4[j], 0); bcp.BCPSubtFinAllo = ParseUtil.ToDecimal(txt5[j], 0); bcp.BCPSubtExp = ParseUtil.ToDecimal(txt6[j], 0); bcp.BCInExpenses = ParseUtil.ToDecimal(txt7[j], 0); bcp.BCOutFunding = ParseUtil.ToDecimal(txt8[j], 0); flag = BGBudCostProManager.AddBGBudCostPro(bcp); } } if (flag) { txtBind(buid); repPayProjectBind(buid); lblShowResult.Text = "修改成功"; //string PostUrl = "BudgetEditList.aspx?depid=" + depid; // Response.Write("<script language='javascript'>alert('修改成功!');window.location.href='" + PostUrl + "';</script>"); } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } }