HPManage/WorkManage/MarkM/AddMarkM.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 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_MarkM_AddMarkM : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                btnOK.Visible = RoleControl("|1270_2|");
                if (Request.Form["AddMarkM"] != null)//添加事件
                {
                    btnOKS();
                }
                else
                {
                    Common.commad.BindDropDownList1(BillTypeTable("1"), ddlBillType, "ID", "BTName");//单据类型表
                    txtBusUnitsID.Attributes.Add("readonly", "true");
                    txtMateID.Attributes.Add("readonly", "true");
                    Common.commad.BindDropDownList1(FiscalYear, ddlMYear, "Value", "Name");//年份
                    Common.commad.BindDropDownList1(FiscalMonth, ddlMMonth, "Value", "Name");//月份
                    string[] YearMonth = DateIsYearOMonth(DateTime.Now).Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    if (YearMonth.Length == 2)
                    {
                        ddlMYear.SelectedValue = YearMonth[0];
                        ddlMMonth.SelectedValue = YearMonth[1];
                    }
                }
            }
            catch (Exception ex)
            {
                Common.WriteLog.CreateLog(ex, "WorkManage_MarkM_AddMarkM", "Page_Load", Session["TrueName"].ToString());
            }
        }
    }
    public void btnOKS()
    {
        try
        {
            BLL.MaterMInfor CustomerBll = new BLL.MaterMInfor();
            Model.MaterMInfor CustomerModel = new Model.MaterMInfor();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("BillType=" + Request.Form["ddlBillType"].ToString());
            strSql.Append(" and MMYear='" + Request.Form["ddlMYear"].ToString() + "'");
            strSql.Append(" and MMMonth='" + Request.Form["ddlMMonth"].ToString() + "'");
            strSql.Append(" and BusUnitsID=" + Request.Form["hidBusUnitsID"].ToString());
            strSql.Append(" and MateID=" + Request.Form["hidMateID"].ToString());
            strSql.Append(" and MMState<>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());
后面还有 31 行代码,购买后查看完整代码

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

AI 解读

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

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