You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
4.0 KiB
C#

10 months ago
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DSWeb.Models;
using DSWeb.EntityDA;
using System.Collections.Generic;
namespace DSWeb.Shipping
{
public partial class FeeDelete : System.Web.UI.Page
{
private string strFeeID;//费用GID
private string strUserID;//操作人GID
private string stroplb;//业务类别
protected void Page_Load(object sender, EventArgs e)
{
if (Session["USERID"] != null)
{
strUserID = Session["USERID"].ToString();
}
if (Request.QueryString["id"] != null)
{ //
strFeeID = Request.QueryString["id"].ToString().Trim();
}
if (Request.QueryString["oplb"] != null)
{
stroplb = Request.QueryString["oplb"].ToString();
}
}
protected void btn_save_Click(object sender, EventArgs e)
{
string strSeason = this.txt_reason.Value.Trim();
FeeDA feeDA = new FeeDA();
FeeEntity feeEntity = feeDA.GetFeeByID(strFeeID);
IList<FeeModifyEntity> feeModifyEntities = new List<FeeModifyEntity>();
FeeModifyEntity feeModifyDelEntity = new FeeModifyEntity();
if (feeEntity != null)
{
if (feeEntity.GID != null)
{
feeModifyDelEntity.GID = Guid.NewGuid().ToString();
feeModifyDelEntity.FeeID = feeEntity.GID;
feeModifyDelEntity.FeeName = feeEntity.FeeName;
feeModifyDelEntity.Type = feeEntity.FeeType;
feeModifyDelEntity.ApplyType = 3;
feeModifyDelEntity.Reason = strSeason;
feeModifyDelEntity.BSNO = feeEntity.BSNO;
feeModifyDelEntity.CustomerName = feeEntity.CustomerName;
feeModifyDelEntity.Unit = feeEntity.Unit;
feeModifyDelEntity.UnitPrice = feeEntity.UnitPrice;
feeModifyDelEntity.Quantity = feeEntity.Quantity;
feeModifyDelEntity.Amount = feeEntity.Amount;
feeModifyDelEntity.Currency = feeEntity.Currency;
feeModifyDelEntity.FRT = feeEntity.FeeFrt;
feeModifyDelEntity.CommissionRate = feeEntity.CommissionRate;
feeModifyDelEntity.ExchangeRate = feeEntity.ExchangeRate;
feeModifyDelEntity.IsAdvancePay = feeEntity.IsAdvancePay;
feeModifyDelEntity.ApplyUser = strUserID;
feeModifyDelEntity.ApplyStatus = 1;
feeModifyDelEntity.Remark = feeEntity.Remark;
//将申请删除费用写入表ch_fee_modify,修改ch_fee.feestatus返回操作结果
FeeModifyDA feeModifyDA = new FeeModifyDA();
int iResult = feeModifyDA.InsertApplyModifyForDelete(feeModifyDelEntity);
if (iResult == 1)
{
Response.Write("<script>javascript:window.parent.opener.location.href = window.parent.opener.location.href;</script>");
Response.Write("<script>javascript:window.opener='null';window.close();</script>");
}
}
else
{
Response.Write("<script>alert('费用不存在');</script>");
return;
}
}
else
{
Response.Write("<script>alert('费用不存在');</script>");
return;
}
}
protected void btn_cancel_Click(object sender, EventArgs e)
{
Response.Write("<script>javascript:window.opener='null';window.close();</script>");
}
}
}