private void AuditorDataBind(int depID, string yearmonth) { DataTable dt = null; if (depID == 0) { dt = BGApplyReimburManager.GetApplyReimburAll(yearmonth); } else { dt = BGApplyReimburManager.GetApplyReimburSByDepID(depID, yearmonth); } if (dt.Rows.Count > 0) { btnexport.Enabled = true; } else { string message = "没有查询到数据"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); btnexport.Enabled = false; } RepLeaderQuery.DataSource = dt; RepLeaderQuery.DataBind(); }
protected void repReiStaQue_ItemCommand(object source, RepeaterCommandEventArgs e) { string arid = e.CommandArgument.ToString(); if (e.CommandName == "AltPro") { //修改 Response.Redirect("ApplyAlter.aspx?arid=" + arid, true); } else if (e.CommandName == "DelPro") { //删除 BGApplyReimburManager.DelApplyReimbur(arid); string yearmonth = ddlYear.Text.Trim() + "-" + ddlMonth.Text.Trim(); BGApplyReimburDataBind(depID, yearmonth); } else if (e.CommandName == "lbtnTJ") { ////提交 //if (BGApplyReimburManager.UpdApplication("退回", txtReason.Text, idStrs)) //{ // int year = Utils.IntSafeConvert(ddlYear.SelectedValue); // BGApplyReimburDataBind(depID, year); //} if (BGApplyReimburManager.UpdApplicationStatus("提交", arid)) { string yearmonth = ddlYear.Text.Trim() + "-" + ddlMonth.Text.Trim(); BGApplyReimburDataBind(depID, yearmonth); } } }
protected void btnexport_Click(object sender, EventArgs e) { string yearmonth = ddlyear.Text.Trim() + "-" + ddlmonth.Text.Trim(); depID = Utils.IntSafeConvert(ddlDep.SelectedValue); DataTable dt; if (depID == 0) { dt = BGApplyReimburManager.GetApplyReimburAllExport(yearmonth); } else { dt = BGApplyReimburManager.GetApplyReimburSByDepID(depID, yearmonth); } if (dt != null && dt.Rows.Count > 0) { MemoryStream ms = ExcelRender.RenderToExcelSetHead(dt, "申请时间#报销单号#上报单位#经办人#金额#事由#申请单状态"); Response.ContentType = "application/xls"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("报销单历史查询.xls", System.Text.Encoding.UTF8)); Response.BinaryWrite(ms.ToArray()); Response.End(); } else { this.Response.Write("<script>alert('无数据不允许导出')</script>"); } }
private void BGApplyReimburDataBind(int depID, string yearmonth) { lbshow.Text = ""; DataTable dt = BGApplyReimburManager.GetByDepID(depID, yearmonth); if (dt.Rows.Count == 0) { lbshow.Text = "该月没查询到数据。"; } repReiStaQue.DataSource = dt; repReiStaQue.DataBind(); }
protected void btnReturn_Click(object sender, EventArgs e) { txtReason.Enabled = true; //string idStrs = null; //if() if (BGApplyReimburManager.UpdApplication("退回", txtReason.Text, arid)) { Response.Redirect("ReimApproval.aspx", true); } else { } }
protected void btnApp_Click(object sender, EventArgs e) { string idStrs = GetDelIDList(repReimAppList, "chkArid"); if (BGApplyReimburManager.UpdApplicationStatus("审核通过", idStrs)) { //int year = Utils.IntSafeConvert(ddlyear.SelectedValue); repReimAppListBind(); //BGApplyReimburDataBind(depID,year); } else { } }
private void AuditorDataBind(int depID, string yearmonth) { DataTable dt = BGApplyReimburManager.GetApplyReimburSByDepID(depID, yearmonth); if (dt.Rows.Count <= 0) { string message = "没有查询到数据"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); } else { repReiStaQue.DataSource = dt; repReiStaQue.DataBind(); } }
protected void btnAudit_Click(object sender, EventArgs e) { int Subcoding = 0; string artype = ""; if (rdBase.Checked == true) { artype = "基本支出"; } else { artype = "项目支出"; } if (ddlType.SelectedItem.Value == "财政拨款") { if (artype == "基本支出") { Subcoding = 50010101; } else { Subcoding = 50010102; } } else if (ddlType.SelectedItem.Value == "其他资金") { if (artype == "基本支出") { Subcoding = 50010201; } else { Subcoding = 50010202; } } string ARExpSub = ddlARExpSub.SelectedItem.Text.ToString(); int PIID = BG_PayIncomeLogic.GetPIIDbycoding(Subcoding, ARExpSub); if (BGApplyReimburManager.UpdApplicationStatus1(PIID, "审核通过", artype, arid)) { Response.Redirect("ReimApproval.aspx", true); } else { } }
private void BGApplyReimburDataBind(int depID, string yearmonth) { DataTable dt = BGApplyReimburManager.GetApplyStateByDepID(depID, yearmonth); if (dt.Rows.Count > 0) { btnexport.Enabled = true; } else { btnexport.Enabled = false; string message = "没有查询到数据"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); } repReiStaQue.DataSource = dt; repReiStaQue.DataBind(); }
private void ApplyAlterDataBind() { DataTable dt = BGApplyReimburManager.GetApplyReimbur(arid); //BGPayIncomeManager.GetPayIncomeListByPIID(arid) if (dt.Rows.Count > 0) { //string PiName = dt.Rows[0]["PIEcoSubName"].ToString(); //txtPro.Text = PiName; //ddlDepart.Text = dt.Rows[0]["DepID"].ToString(); //txtARReiSinNum.Text = dt.Rows[0]["ARReiSinNum"].ToString(); //ddlARExpType.Text = dt.Rows[0]["ARExpType"].ToString(); //ddlARExpPro.SelectedItem.Value = dt.Rows[0]["ARExpPro"].ToString(); txtBITime.Text = dt.Rows[0]["ARTime"].ToString(); txtARRepDep.Text = dt.Rows[0]["ARRepDep"].ToString(); txtARAgent.Text = dt.Rows[0]["ARAgent"].ToString(); txtARMon.Text = Convert.ToDecimal(dt.Rows[0]["ARMon"]).ToString("f8").TrimEnd('0').TrimEnd('.'); txtARExcu.Text = dt.Rows[0]["ARExcu"].ToString(); txtreason.Text = dt.Rows[0]["ARReason"].ToString(); txtreason.ReadOnly = true; string name = BG_PayIncomeManager.GetBG_PayIncomeByPIID(common.IntSafeConvert(dt.Rows[0]["PPID"].ToString())).PIEcoSubName; ddlARExpSub.SelectedItem.Text = name; Session["PIID"] = common.IntSafeConvert(dt.Rows[0]["PPID"].ToString()); DataTable dt1 = BGReimDocumentsManager.GetReimDocuments(arid); string RDType = string.Empty; if (dt1.Rows.Count > 0) { RDType = dt1.Rows[0]["RDType"].ToString(); lbRDType.Text = RDType; } //if (RDType == "") //{ // Response.Redirect("SearchTravelCost.aspx?arid=" + arid, true); //} //else if (RDType == "") //{ // Response.Redirect("SearchMediCost.aspx?arid=" + arid, true); //} //else if (RDType == "") //{ // Response.Redirect("SearchOtherCost.aspx?arid=" + arid, true); //} } }
private void BGApplyReimburDataBind(int depID, string yearmonth) { DataTable dt = null; if (depID == 0) { dt = BGApplyReimburManager.GetApplyReimburByAll(yearmonth); } else { dt = BGApplyReimburManager.GetApplyReimburTByDepID(depID, yearmonth); } if (dt.Rows.Count <= 0) { string message = "没有查询到数据"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); } else { repReimAppList.DataSource = GetSortDT(dt); repReimAppList.DataBind(); } }
protected void btnAlter_Click(object sender, EventArgs e) { BG_ApplyReimbur bt = new BG_ApplyReimbur(); bt.ARID = Utils.IntSafeConvert(arid); bt.ARAgent = txtARAgent.Text.Trim(); //经办人 bt.ARExcu = txtARExcu.Text.Trim(); //事由 bt.PPID = Utils.IntSafeConvert(Session["PIID"]); //支出项目ID //bt.ARExpType = ddlARExpType.SelectedValue; //支出类型 bt.ARListSta = "未提交"; //申请表状态 bt.ARMon = decimal.Parse(txtARMon.Text.Trim()); //金额 bt.ARReiSinNum = txtARReiSinNum.Text.Trim(); //报销单号 bt.ARRepDep = txtARRepDep.Text.Trim(); //上报部门 bt.ARTime = DateTime.Parse(txtBITime.Text.Trim()); //申请时间 bt.DepID = DepID; //部门 BGApplyReimburManager.UpdApplyReimbur(bt); string message = "修改成功!"; Response.Write("<script language=javascript>alert(\"" + message.Trim() + "\");window.top.close();</script>"); //Response.Redirect("ApplyList.aspx", true); btnAlter.Enabled = true; }