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 = "操作失败、请重试"; } }
private void cbPayProjectBind() { DataTable dt = BG_PayProjectManager.GetAllBG_PayProject(); for (int i = 0; i < dt.Rows.Count; i++) { cb3.Items.Add(new Ext.Net.ListItem(dt.Rows[i]["PayPrjName"].ToString(), dt.Rows[i]["PPID"].ToString())); cmbPayProType.Items.Add(new Ext.Net.ListItem(dt.Rows[i]["PayPrjName"].ToString(), dt.Rows[i]["PPID"].ToString())); } }
protected void btnSure_Click(object sender, EventArgs e) { int bid = common.IntSafeConvert(Hidbuid.Value); BG_BudItemsLibraries bi = new BG_BudItemsLibraries(); if (HidFlag.Value == "1") { bi = BG_BudItemsLibrariesManager.GetBG_BudItemsLibrariesByBudItID(bid); } bi.BILAppReaCon = txtBIAppReaCon.Text.Trim(); bi.BILAttr = ddlProProper.SelectedValue; bi.BILExpGistExp = txtBIExpGistExp.Text.Trim(); bi.BILFunSub = ddlFunSub.SelectedValue; bi.BILMon = Convert.ToDecimal(txtBILMon.Text); bi.BILLongGoal = txtBILongGoal.Text.Trim(); bi.BILOthExpProb = txtBIOthExpProb.Text.Trim(); bi.BILProType = ddlPayProType.SelectedItem.Text; bi.BILYearGoal = txtBIYearGoal.Text.Trim(); bi.DepID = common.IntSafeConvert(ddlDeptName.SelectedValue); bi.PPID = common.IntSafeConvert(ddlPayProType.SelectedValue); bi.BILProName = txtProName.Text.Trim(); bi.BILProDescrip = txtProDesc.Text.Trim(); bi.BILProCategory = ddlProType.SelectedValue; bi.PIID = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID; if (HidFlag.Value == "0") { BG_BudItemsLibrariesManager.AddBG_BudItemsLibraries(bi); txtBIAppReaCon.Text = ""; txtBIExpGistExp.Text = ""; txtBILongGoal.Text = ""; txtBILMon.Text = ""; txtBIOthExpProb.Text = ""; txtBIYearGoal.Text = ""; txtProDesc.Text = ""; txtProName.Text = ""; lblShowResult.Text = "添加成功"; } else { BG_BudItemsLibrariesManager.ModifyBG_BudItemsLibraries(bi); txtBIAppReaCon.Text = ""; txtBIExpGistExp.Text = ""; txtBILongGoal.Text = ""; txtBILMon.Text = ""; txtBIOthExpProb.Text = ""; txtBIYearGoal.Text = ""; txtProDesc.Text = ""; txtProName.Text = ""; lblShowResult.Text = "修改成功"; Response.Redirect("LibrariesEditList.aspx", true); } }
private void cmbData() { List <object> strlist = new List <object>(); DataTable dtPay = BG_PayProjectManager.GetAllBG_PayProject(); for (int i = 0; i < dtPay.Rows.Count; i++) { string name = dtPay.Rows[i]["PayPrjName"].ToString(); strlist.Add(new { PayPrjName = name }); } cmbName.DataSource = strlist; cmbName.DataBind(); //DataTable dt = new DataTable(); //dt.Columns.Add("name"); //DataTable dtPay = BG_PayProjectManager.GetAllBG_PayProject(); //for (int i = 0; i < dtPay.Rows.Count; i++) //{ // dt.Rows.Add(); // dt.Rows[i]["name"] = dtPay.Rows[i]["PayPrjName"]; //} //cmbName.DataSource = dt; //cmbName.DataBind(); }
private void PreviewDataBind() { DataTable dt = new DataTable(); dt.Columns.Add("PSName"); dt.Columns.Add("rjs1"); dt.Columns.Add("rjs2"); dt.Columns.Add("rjs3"); dt.Columns.Add("rjs4"); dt.Columns.Add("rjs5"); dt.Columns.Add("rjs6"); dt.Columns.Add("rjs7"); for (int i = 0; i < 5; i++) { dt.Rows.Add(); dt.Rows[i]["PSName"] = ""; dt.Rows[i]["rjs1"] = ""; dt.Rows[i]["rjs2"] = ""; dt.Rows[i]["rjs3"] = ""; dt.Rows[i]["rjs4"] = ""; dt.Rows[i]["rjs5"] = ""; dt.Rows[i]["rjs6"] = ""; dt.Rows[i]["rjs7"] = ""; } Store1.DataSource = dt; Store1.DataBind(); DataTable dt2 = new DataTable(); dt2.Columns.Add("PSName"); dt2.Columns.Add("rjs1"); dt2.Columns.Add("rjs2"); dt2.Columns.Add("rjs3"); dt2.Columns.Add("rjs4"); dt2.Columns.Add("rjs5"); dt2.Columns.Add("rjs6"); dt2.Columns.Add("rjs7"); dt2.Columns.Add("rjs8"); dt2.Columns.Add("rjs9"); for (int i = 0; i < 5; i++) { dt2.Rows.Add(); dt2.Rows[i]["PSName"] = ""; dt2.Rows[i]["rjs1"] = ""; dt2.Rows[i]["rjs2"] = ""; dt2.Rows[i]["rjs3"] = ""; dt2.Rows[i]["rjs4"] = ""; dt2.Rows[i]["rjs5"] = ""; dt2.Rows[i]["rjs6"] = ""; dt2.Rows[i]["rjs7"] = ""; dt2.Rows[i]["rjs8"] = ""; dt2.Rows[i]["rjs9"] = ""; } Store2.DataSource = dt2; Store2.DataBind(); DataTable dt3 = new DataTable(); dt3.Columns.Add("PSName"); dt3.Columns.Add("rjs1"); dt3.Columns.Add("rjs2"); dt3.Columns.Add("rjs3"); dt3.Columns.Add("rjs4"); dt3.Columns.Add("rjs5"); dt3.Columns.Add("rjs6"); dt3.Columns.Add("rjs7"); dt3.Columns.Add("rjs8"); dt3.Columns.Add("rjs9"); dt3.Columns.Add("rjs10"); dt3.Columns.Add("rjs11"); dt3.Columns.Add("rjs12"); dt3.Columns.Add("rjs13"); dt3.Columns.Add("rjs14"); for (int i = 0; i < 5; i++) { dt3.Rows.Add(); dt3.Rows[i]["PSName"] = ""; dt3.Rows[i]["rjs1"] = ""; dt3.Rows[i]["rjs2"] = ""; dt3.Rows[i]["rjs3"] = ""; dt3.Rows[i]["rjs4"] = ""; dt3.Rows[i]["rjs5"] = ""; dt3.Rows[i]["rjs6"] = ""; dt3.Rows[i]["rjs7"] = ""; dt3.Rows[i]["rjs8"] = ""; dt3.Rows[i]["rjs9"] = ""; dt3.Rows[i]["rjs10"] = ""; dt3.Rows[i]["rjs11"] = ""; dt3.Rows[i]["rjs12"] = ""; dt3.Rows[i]["rjs13"] = ""; dt3.Rows[i]["rjs14"] = ""; } Store3.DataSource = dt3; Store3.DataBind(); DataTable dt4 = BG_PayProjectManager.GetAllBG_PayProject(); dt4.Columns.Add("rjs1"); dt4.Columns.Add("rjs2"); dt4.Columns.Add("rjs3"); dt4.Columns.Add("rjs4"); dt4.Columns.Add("rjs5"); dt4.Columns.Add("rjs6"); dt4.Columns.Add("rjs7"); dt4.Columns.Add("rjs8"); dt4.Columns.Add("rjs9"); dt4.Columns.Add("rjs10"); dt4.Columns.Add("rjs11"); dt4.Columns.Add("rjs12"); dt4.Columns.Add("rjs13"); for (int i = 0; i < 5; i++) { dt4.Rows[i]["rjs1"] = "0"; dt4.Rows[i]["rjs2"] = "0"; dt4.Rows[i]["rjs3"] = "0"; dt4.Rows[i]["rjs4"] = "0"; dt4.Rows[i]["rjs5"] = "0"; dt4.Rows[i]["rjs6"] = "0"; dt4.Rows[i]["rjs7"] = "0"; dt4.Rows[i]["rjs8"] = "0"; dt4.Rows[i]["rjs9"] = "0"; dt4.Rows[i]["rjs10"] = "0"; dt4.Rows[i]["rjs11"] = "0"; dt4.Rows[i]["rjs12"] = "0"; dt4.Rows[i]["rjs13"] = "0"; } Store4.DataSource = dt4; Store4.DataBind(); }
protected void btnSure_Click(object sender, EventArgs e) { BG_BudItems bi = new BG_BudItems(); bi.BIAppConMon = 0;// decimal.Parse(txtBudConNumber.Text.Trim());审批控制金额,应该是预算控制数 bi.BIAppReaCon = txtBIAppReaCon1.Text.Trim(); bi.BIAttr = ddlProProper1.SelectedValue; bi.BIBudSta = "等下对接"; //Session[Constant.UserName].ToString(); bi.BICause = ""; //退回原因 bi.BICharger = txtBICharger1.Text.Trim(); bi.BICode = txtItemNumber1.Text.Trim(); //项目编号 bi.BIEndTime = DateTime.Parse(txtBIEndTime1.Text.Trim()); bi.BIExpGistExp = txtBIExpGistExp1.Text.Trim(); bi.BIFinAllo = 0; // decimal.Parse(txtBudConNumber.Text.Trim());财政拨款 bi.BIFunSub = ddlFunSub1.Text.Trim(); bi.BILastYearCarry = 0; // decimal.Parse(txtBudConNumber.Text.Trim());上年结账 bi.BILongGoal = txtBILongGoal1.Text.Trim(); bi.BIMon = common.IntSafeConvert(HidMonTotal.Value); //GetBIMon(coll.GetValues("txt4")); bi.BIMonSou = ""; //资金来源 bi.BIOthExpProb = txtBIOthExpProb1.Text.Trim(); bi.BIOthFun = 0; // decimal.Parse(txtBudConNumber.Text.Trim());其他资金 bi.BIPlanHz = ddlBIPlanHz1.SelectedValue; //项目频度 bi.BIProType = ddlPayProType1.SelectedItem.Text; bi.BIStaTime = DateTime.Parse(txtBIStaTime1.Text.Trim()); bi.BIYearGoal = txtBIYearGoal1.Text.Trim(); bi.PPID = common.IntSafeConvert(ddlPayProType1.SelectedValue); // bi.BudSta = "未提交"; // bi.PIID = BG_PayProjectManager.GetBG_PayProjectByPPID(bi.PPID).PIID; //common.IntSafeConvert(ddlFunSub.SelectedValue);//yj bi.BIProName = txtProName1.Text.Trim(); bi.BIReportTime = ParseUtil.ToDateTime(txtBITime1.Text.Trim(), DateTime.Now); bi.BIConNum = 0;//预算控制数 bi.BIProDescrip = txtProDesc1.Text.Trim(); bi.DepID = common.IntSafeConvert(Hiddepid.Value); bi.BIProCategory = ddlProType1.SelectedItem.Text; bi.BIYear = common.IntSafeConvert(txtyear.Text); int buid = BG_BudItemsManager.AddBG_BudItems(bi).BudID;//yj if (buid > 0) { BG_BudItemHis hisbi = new BG_BudItemHis(); hisbi.BudID = buid; 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 = ""; //退回原因 hisbi.BICharger = txtBICharger.Text.Trim(); hisbi.BICode = txtItemNumber.Text.Trim(); //项目编号 hisbi.BIEndTime = DateTime.Parse(txtBIEndTime.Text.Trim()); hisbi.BIExpGistExp = txtBIExpGistExp.Text.Trim(); 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(HidMonTotal.Value); //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; hisbi.BIYear = common.IntSafeConvert(txtyear.Text); int flaid = BG_BudItemHisManager.AddBG_BudItemHis(hisbi).BudHisID; NameValueCollection coll = Request.Form; string[] txt1 = coll.GetValues("txt1"); //行号 string[] txt2 = coll.GetValues("txt2"); //当前年度 string[] txt3 = coll.GetValues("ddlIncome"); //经济科目 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 && flaid > 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 = ""; DataTable dtpiid = BG_PayIncomeLogic.GetBG_PayIncomeByname(txt3[j]); int piid = common.IntSafeConvert(dtpiid.Rows[0]["PIID"]); bcp.PIID = piid; 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);//yj } } if (flag) { lblShowResult.Text = "添加成功"; BGBudItemHisManage.InsertBudItemHis(bi); string PostUrl = "BudgetEditList.aspx?depid=" + Hiddepid.Value; Response.Write("<script language='javascript'>if(confirm('是否继续添加?')){window.location.reload();}else{window.location.href='" + PostUrl + "';}</script>"); } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } } else { lblShowResult.Text = "操作失败、请检查数据后重试"; } }