HPManage/WorkManage/Pay/AddPay.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class WorkManage_Pay_AddPay : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                btnOK.Visible = RoleControl("|1260_2|");
                if (Request.Form["AddPay"] != null)//添加事件
                {
                    btnOKS();
                }
                else
                {
                    Common.commad.BindDropDownList1(ReasonTable, ddlReason, "ID", "ReasonName");//资金用途表
                    Common.commad.BindDropDownList1(BillTypeTable("1"), ddlBillType, "ID", "BTName");//单据类型表
                    //从单据类型表中筛选出订单类型
                    txtPayNumber.Value = Number_String(DateTime.Now, "PayInfor", "PayNumber", "PayTime", "YF");//生成单据编码
                    txtCostomerID.Attributes.Add("readonly", "true");
                    txtPayTime.Value = DateTime.Now.ToShortDateString();
                    txtPayTime.Attributes.Add("readonly", "true");
                }
            }
            catch (Exception ex)
            {
                Common.WriteLog.CreateLog(ex, "WorkManage_Pay_AddPay", "Page_Load", Session["TrueName"].ToString());
            }
        }
    }
    public void btnOKS()
    {
        try
        {
            BLL.PayInfor CustomerBll = new BLL.PayInfor();
            Model.PayInfor CustomerModel = new Model.PayInfor();
            DataSet dsCustomer = CustomerBll.GetList(" PayNumber='" + Request.Form["txtPayNumber"].ToString() + "' and PState<>2");
            DataTable dtCustomer = dsCustomer.Tables[0];
            if (dtCustomer.Rows.Count > 0) { Response.Write("again|v|"); return; }
            CustomerModel.PayNumber = Request.Form["txtPayNumber"].ToString();
            CustomerModel.BillType = Common.DataConvert.StringToInt(Request.Form["ddlBillType"].ToString());
            CustomerModel.PayTime = DateTime.Parse(Request.Form["txtPayTime"].ToString());
            CustomerModel.BusUnitsID = Common.DataConvert.StringToInt(Request.Form["hidCostomerID"].ToString());
            CustomerModel.PILoss = Common.DataConvert.StringToInt(Request.Form["ddlMIILoss"].ToString());
            if (CustomerModel.PILoss == 0)
            {
                CustomerModel.PayAcount = Common.DataConvert.StringToDecimal(Request.Form["txtPayAcount"].ToString());
            }
            else
            {
                CustomerModel.PayAcount = -Common.DataConvert.StringToDecimal(Request.Form["txtPayAcount"].ToString());
            }
后面还有 16 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。