140 lines
4.8 KiB
C#
140 lines
4.8 KiB
C#
using System;
|
||
using System.Data;
|
||
using System.Linq;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using SuperMap.RealEstate.CoreFrameWork;
|
||
using SuperMap.RealEstate.ServiceModel;
|
||
using SuperMap.RealEstate.Utility;
|
||
using SuperMap.RealEstate.Web.UI;
|
||
using SuperMap.RealEstate.Web.UI.WebControls;
|
||
using SuperMap.RealEstate.Web.Utility;
|
||
using HWSB = SuperMap.RealEstate.HighWay.Storage.Business;
|
||
using Business = SuperMap.RealEstate.SendRec.Storage.Business;
|
||
|
||
namespace SuperMap.RealEstate.SendRec.Modules.SearchProinst
|
||
{
|
||
/// <summary>
|
||
/// T_APPLYPROINST_申请 的WebUserControl
|
||
/// <summary>
|
||
public partial class APPLYPROINST : UserControl<Business.APPLYPROINST>
|
||
{
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (IsPostBack) return;
|
||
|
||
//初始化并加载列表
|
||
GridViewEx1.SelectingWithInit<Business.APPROVED>(ObjectDataSource1, null);
|
||
}
|
||
|
||
//在此加入界面的数据初始化(Page_Load之前),如DropDownList的数据源绑定等
|
||
public override void InitializeWebControl()
|
||
{
|
||
APPLYPROINST_TYPE.Clear();
|
||
DictionaryHelper.BindingDropDownList("APPLYPROINST_TYPE", APPLYPROINST_TYPE.Items, this.Transaction);
|
||
|
||
SERVERPART_ID.Clear();
|
||
ListItemEx _ListItemEx = null;
|
||
//ListItemEx _ListItemEx = new ListItemEx();
|
||
//_ListItemEx.Text = StorageHighWay.CommonHelper.GetConfigValue("topCompanyName");
|
||
//_ListItemEx.Value = "0";
|
||
//SERVERPART_ID.Items.Add(_ListItemEx);
|
||
foreach (HWSB.SERVERPART _SERVERPART in new HWSB.SERVERPART(Transaction).GetPassportServerPart(Page.PassportInfo.CityAuthority))
|
||
{
|
||
_ListItemEx = new ListItemEx();
|
||
_ListItemEx.Text = _SERVERPART.SERVERPART_NAME;
|
||
_ListItemEx.Value = _SERVERPART.SERVERPART_ID.ToString();
|
||
SERVERPART_ID.Items.Add(_ListItemEx);
|
||
}
|
||
|
||
}
|
||
|
||
//载入数据
|
||
public override bool LoadData()
|
||
{
|
||
APPLYPROINST_DATE.Text = System.DateTime.Now.ToString();
|
||
|
||
PASSPORT_NAME.Text = Page.PassportInfo.Name;
|
||
|
||
PASSPORT_ID.Text = Page.PassportInfo.ID.ToString();
|
||
|
||
APPLYPROINST_STATE.Text = "1000";
|
||
|
||
APPLYPROISNT_FLAG.Text = "0";
|
||
|
||
cssGroupBar_SP.Visible = false;
|
||
|
||
//如果是工作流组件请自行修改载入的逻辑,以下是功能模块的默认代码
|
||
if (!String.IsNullOrEmpty(Request["ID"]))
|
||
{
|
||
cssGroupBar_SP.Visible = true;
|
||
CurrObject.APPLYPROINST_ID_Encrypt = Request["ID"];
|
||
return this.Select();
|
||
}
|
||
//默认返回值,工作流组件返回True,功能模块返回False。
|
||
return (WorkFlowPage != null);
|
||
}
|
||
|
||
//OnDataAction_XXXXX 有一个系列可用,在此加入界面的逻辑处理
|
||
//e.CancelDataAction 来处理是否取消该动作;
|
||
//失败的原因可以用Page.Alert()传递到页面
|
||
public override void OnDataAction_BeforeSave(DataActionEventArgs<Business.APPLYPROINST> e)
|
||
{
|
||
base.OnDataAction_BeforeSave(e);
|
||
}
|
||
|
||
|
||
public override bool SaveEx(ClientSetEventArgs ClientSet)
|
||
{
|
||
bool flag = base.SaveEx(ClientSet);
|
||
|
||
return flag;
|
||
}
|
||
|
||
|
||
#region 方法 -> 绑定审批信息
|
||
protected void ButtonSearch_CallBackClick(object sender, ClientSetEventArgs e)
|
||
{
|
||
GridViewEx1.Selecting<Business.APPROVED>(ObjectDataSource1, null);
|
||
//设置UI变化
|
||
e.SetValue(GridViewEx1);
|
||
}
|
||
|
||
//翻页事件
|
||
protected void GridPageEx1_CallBackPageChanged(object src, ClientSetEventArgs e)
|
||
{
|
||
GridViewEx1.Pagging<Business.APPROVED>(ObjectDataSource1, null);
|
||
//设置UI变化
|
||
e.SetValue(GridViewEx1);
|
||
}
|
||
|
||
//查询SQL设置
|
||
protected void GridViewEx1_SelectMethodParameters(object sender, SelectMethodParametersArgs e)
|
||
{
|
||
//搜索选项的搜索条件过滤
|
||
if (Request["ID"] != null)
|
||
{
|
||
e.AddAndParams("APPLYPROINST_ID", Request["ID"].ToDecrypt());
|
||
}
|
||
else
|
||
{
|
||
e.SetOtherUserCustomWhereSqlString = "1!=1";
|
||
}
|
||
e.AddOrderByParams("APPROVED_DATE", true);
|
||
}
|
||
#endregion
|
||
|
||
protected void GridViewEx1_RowDataBound(object sender, GridViewRowEventArgs e)
|
||
{
|
||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||
{
|
||
if (string.IsNullOrEmpty(Request["EditType"]) || Request["EditType"] != "true")
|
||
{
|
||
e.Row.Attributes["onclick"] = "";
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
}
|