60 lines
2.4 KiB
C#
60 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using SuperMap.RealEstate.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
namespace SuperMap.RealEstate.CoreFrameWork.Dictionary
|
|
{
|
|
|
|
public partial class FieldEnumPage : SuperMap.RealEstate.HighWay.Modules.ServerPart.BasePage//SuperMap.RealEstate.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
if (Request["ID"] != null)
|
|
{
|
|
FieldEnum1.CurrObject.FieldEnum_ID_Encrypt = Request["ID"];
|
|
FieldEnum1.Select();
|
|
}
|
|
ButtonVisibleCtrl();
|
|
SetControlConfirm(ButtonDelete, "您确认删除当前枚举及其子枚举?");
|
|
SetControlClientAction(ButtonDelete, false, true, true);
|
|
SetControlClosePopDialog(ButtonClose, "FieldEnumDefault");
|
|
SetControlClientAction(ButtonSave);
|
|
//DictionaryHelper.GetDictionary(Transaction, "Division_Code", "Certificate_Type");
|
|
|
|
}
|
|
protected void ButtonSave_Click(object sender, EventArgs e)
|
|
{
|
|
if (!FieldEnum1.Save())
|
|
{
|
|
Transaction.Rollback();
|
|
return;
|
|
}
|
|
FieldEnum1.BindDropDownList(FieldEnum1.CurrObject.KeyID,
|
|
FieldEnum1.CurrObject.FieldEnum_PID.ToString());
|
|
Alert("保存成功!", 3);
|
|
Redirect("parent.ObjectTreeView", "FieldEnumTree.aspx?TypeID=" +
|
|
Request["TypeID"] + "&ID=" + FieldEnum1.CurrObject.FieldEnum_ID_Encrypt + "#selectNode");
|
|
ButtonVisibleCtrl();
|
|
}
|
|
|
|
private void ButtonVisibleCtrl()
|
|
{
|
|
ButtonDelete.Enabled = !string.IsNullOrEmpty(FieldEnum1.CurrObject.KeyID);
|
|
}
|
|
protected void ButtonDelete_Click(object sender, EventArgs e)
|
|
{
|
|
FieldEnum1.BindControlToObject();
|
|
string _Encrypt_PID = FieldEnum1.CurrObject.FieldEnum_PID.ToEncrypt();
|
|
FieldEnum1.Delete();
|
|
ButtonVisibleCtrl();
|
|
Alert("删除成功!", 3);
|
|
Redirect("parent.ObjectTreeView", "FieldEnumTree.aspx?TypeID=" + Request["TypeID"] +
|
|
"&ID=" + _Encrypt_PID + "#selectNode");
|
|
//优化不能选择下级分类作为自己的上级分类后,导致删除必须重载当前页
|
|
Redirect(Request.Url.AbsolutePath + "?TypeID=" + Request["TypeID"]);
|
|
}
|
|
}
|
|
}
|