HPManage/WorkManage/CashM/AddCashM.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;
using System.Text;

public partial class WorkManage_CashM_AddCashM : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                btnOK.Visible = RoleControl("|1254_2|");
                if (Request.Form["AddCashM"] != null)//添加事件
                {
                    btnOKS();
                }
                else
                {
                    Common.commad.BindDropDownList1(BillTypeTable("3"), ddlBillType, "ID", "BTName");//单据类型表
                    txtCostomerID.Attributes.Add("readonly", "true");
                    Common.commad.BindDropDownList1(FiscalYear, ddlCashYear, "Value", "Name");//年份
                    Common.commad.BindDropDownList1(FiscalMonth, ddlCashMonth, "Value", "Name");//月份
                    string[] YearMonth = DateIsYearOMonth(DateTime.Now).Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    if (YearMonth.Length == 2)
                    {
                        ddlCashYear.SelectedValue = YearMonth[0];
                        ddlCashMonth.SelectedValue = YearMonth[1];
                    }
                }
            }
            catch (Exception ex)
            {
                Common.WriteLog.CreateLog(ex, "WorkManage_CashM_AddCashM", "Page_Load", Session["TrueName"].ToString());
            }
        }
    }
    public void btnOKS()
    {
        try
        {
            BLL.CashMInfor CustomerBll = new BLL.CashMInfor();
            Model.CashMInfor CustomerModel = new Model.CashMInfor();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("BillType=" + Request.Form["ddlBillType"].ToString());
            strSql.Append(" and CashYear='" + Request.Form["ddlCashYear"].ToString() + "'");
            strSql.Append(" and CashMonth='" + Request.Form["ddlCashMonth"].ToString() + "'");
            strSql.Append(" and BusUnitsID=" + Request.Form["hidCostomerID"].ToString());
            strSql.Append(" and CMState<>2");
            DataSet dsCustomer = CustomerBll.GetList(strSql.ToString());
            DataTable dtCustomer = dsCustomer.Tables[0];
            if (dtCustomer.Rows.Count > 0) { Response.Write("again|v|"); return; }
            CustomerModel.BillType = Common.DataConvert.StringToInt(Request.Form["ddlBillType"].ToString());
            CustomerModel.CashYear = Request.Form["ddlCashYear"].ToString();
            CustomerModel.CashMonth = Request.Form["ddlCashMonth"].ToString();
后面还有 20 行代码,购买后查看完整代码

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

AI 解读

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

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