ModelManage/SaleSetManage/CustType/EditCustType.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 SaleSetManage_CustType_EditCustType : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
btnOK.Visible = RoleControl("|1111_3|");//权限判断
if (Request.Form["EditCustType"] != null)//修改
{
btnOKS();
}
else
{
if (Request.QueryString["CustTypeIDEdit"] == null) { return; }
Common.commad.BindDropDownList1(CustomerTypeTable, ddlCTParentID, "ID", "CTypeName");
//添加到页面上
BLL.CustTypeInfor CtiBll = new BLL.CustTypeInfor();
Model.CustTypeInfor CtiModel = new Model.CustTypeInfor();
CtiModel = CtiBll.GetModel(Common.DataConvert.StringToInt(Request.QueryString["CustTypeIDEdit"].ToString()));
txtCTypeNumber.Value = CtiModel.CTypeNumber;
txtCTypeName.Value = CtiModel.CTypeName;
ddlCTParentID.SelectedValue = CtiModel.CTParentID.ToString();
txtIDName.Value = CtiModel.ID.ToString();
txtCTypeNumber.Attributes.Add("readonly", "true");
}
}
catch (Exception ex)
{
Common.WriteLog.CreateLog(ex, "SaleSetManage_CustType_EditCustType", "btnOKS", Session["TrueName"].ToString());
}
}
}
public void btnOKS()
{
try
{
BLL.CustTypeInfor CtiBll = new BLL.CustTypeInfor();
Model.CustTypeInfor CtiModel = new Model.CustTypeInfor();
DataSet dsCti = CtiBll.GetList(" CTypeName='" + Request.Form["txtCTypeName"].ToString() + "' and ID<>" + Request.Form["EditCustType"].ToString() + " and (CTState=0 or CTState=1)");
DataTable dtCti = dsCti.Tables[0];
if (dtCti.Rows.Count > 0) { Response.Write("again|v|"); return; }
CtiModel.ID = Common.DataConvert.StringToInt(Request.Form["EditCustType"].ToString());
CtiModel.CTypeNumber = Request.Form["txtCTypeNumber"].ToString();
CtiModel.CTypeName = Request.Form["txtCTypeName"].ToString();
CtiModel.CTParentID = Common.DataConvert.StringToInt(Request.Form["ddlindex"].ToString());
CtiModel.BuilderID = Common.DataConvert.StringToInt(Session["UserID"].ToString());
CtiModel.BuiderTime = DateTime.Now;
CtiModel.CTState = 1;
CtiModel.CTLevel = CtiModel.CTParentID == 0 ? getCustLevelID(CtiModel.CTParentID) : getCustLevelID(CtiModel.CTParentID) + 1;
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
