153 lines
6.0 KiB
C#
153 lines
6.0 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using Business = SuperMap.RealEstate.SendRec.Storage.Business;
|
|
using HWSB = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.SendRec.Modules.PrintBill
|
|
{
|
|
public partial class BillDefault : BasePage
|
|
{
|
|
protected override void OnLoadComplete(EventArgs e)
|
|
{
|
|
base.OnLoadComplete(e);
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
//设置回车焦点按钮
|
|
APPLYPROINST1.LoadData();
|
|
Business.APPLYPROINST _APPLYPROINST = new Business.APPLYPROINST(this.Transaction);
|
|
_APPLYPROINST.APPLYPROINST_ID_Encrypt = Request["ID"];
|
|
if (_APPLYPROINST.Select())
|
|
{
|
|
HWSB.SERVERPART _SERVERPART = new HWSB.SERVERPART(this.Transaction);
|
|
_SERVERPART.SERVERPART_ID = _APPLYPROINST.SERVERPART_ID;
|
|
if (_SERVERPART.Select())
|
|
{
|
|
Label1.Text = _SERVERPART.SERVERPART_NAME + "物资请购单";
|
|
}
|
|
if (_APPLYPROINST.APPLYPROINST_TYPE == 1010)
|
|
{
|
|
GridViewEx1.Columns[GridViewEx1.Columns.Count - 2].Visible = true;
|
|
}
|
|
}
|
|
InitApproved();
|
|
InitWebControls();
|
|
//初始化并加载列表
|
|
GridViewEx1.SelectingWithInit<Business.APPLYPROINST>(ObjectDataSource1, GridPageEx1,
|
|
DictionaryHelper.GetDictionary(Transaction, "COMMODITY_UNIT").AsNewKeys("UNIT"),
|
|
DictionaryHelper.GetDictionary(Transaction, "APPLYPROINST_TYPE"),
|
|
HWSB.CommonHelper.GetDictionary(Transaction, "SERVERPART_ID",
|
|
"SELECT SERVERPART_ID,SERVERPART_NAME FROM HIGHWAY_STORAGE.T_SERVERPART"));
|
|
//工具条按钮事件
|
|
//GridViewEx1.SetOpenControl(ButtonNew);
|
|
}
|
|
|
|
private void InitWebControls()
|
|
{
|
|
}
|
|
|
|
|
|
//查询
|
|
protected void ButtonSearch_CallBackClick(object sender, ClientSetEventArgs e)
|
|
{
|
|
GridViewEx1.Selecting<Business.APPLYPROINST>(ObjectDataSource1, GridPageEx1);
|
|
//设置UI变化
|
|
e.SetValue(GridViewEx1);
|
|
e.SetValue(GridPageEx1);
|
|
}
|
|
|
|
//翻页事件
|
|
protected void GridPageEx1_CallBackPageChanged(object src, ClientSetEventArgs e)
|
|
{
|
|
GridViewEx1.Pagging<Business.APPLYPROINST>(ObjectDataSource1, GridPageEx1);
|
|
//设置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";
|
|
}
|
|
liinfo.Attributes["style"] = "display:block";
|
|
}
|
|
|
|
#region 方法 -> 行绑定事件
|
|
protected void GridViewEx1_RowDataBound(object sender, GridViewRowEventArgs e)
|
|
{
|
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
|
{
|
|
string _APPLYPROINST_ID = GridViewEx1.DataKeys[e.Row.RowIndex].Values["APPLYPROINST_ID"].ToString().ToEncrypt();
|
|
//e.Row.Attributes["data-code"] = _APPLYPROINST_ID;
|
|
//e.Row.Attributes["ondblclick"] = "showDetail(this)";
|
|
//e.Row.Attributes["itemtype"] = "datatype";
|
|
//e.Row.ToolTip = "双击查看详情";
|
|
|
|
HWSB.COMMODITYTYPE _COMMODITYTYPE = new HWSB.COMMODITYTYPE(this.Transaction);
|
|
_COMMODITYTYPE.COMMODITYTYPE_ID_Encrypt = e.Row.Cells[1].Text.ToEncrypt();
|
|
if (_COMMODITYTYPE.Select())
|
|
{
|
|
e.Row.Cells[1].Text = _COMMODITYTYPE.COMMODITYTYPE_NAME;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 方法 -> 审批信息
|
|
private void InitApproved()
|
|
{
|
|
if (Request["ID"] != null)
|
|
{
|
|
Business.APPLYPROINST _APPLYPROINST = new Business.APPLYPROINST(this.Transaction);
|
|
_APPLYPROINST.APPLYPROINST_ID = int.Parse(Request["ID"].ToDecrypt());
|
|
if (_APPLYPROINST.Select())
|
|
{
|
|
foreach (DataRow _DataRow in _APPLYPROINST.GetApproved().Rows)
|
|
{
|
|
switch (_DataRow["APPROVED_TYPE"].ToString())
|
|
{
|
|
case "1000":
|
|
ApplyPerson.Text = _DataRow["PASSPORT_NAME"].ToString();
|
|
break;
|
|
case "2000":
|
|
DepartPerson.Text = _DataRow["PASSPORT_NAME"].ToString();
|
|
break;
|
|
case "3000":
|
|
CWPerson.Text = _DataRow["PASSPORT_NAME"].ToString();
|
|
break;
|
|
case "4000":
|
|
DepartmentManager.Text = _DataRow["PASSPORT_NAME"].ToString();
|
|
break;
|
|
}
|
|
}
|
|
//try
|
|
//{
|
|
// Business.SUPPLIER _SUPPLIER = new Business.SUPPLIER();
|
|
// _SUPPLIER.SUPPLIER_ID = _APPLYPROINST.SUPPLIER_ID;
|
|
// if (_SUPPLIER.Select())
|
|
// {
|
|
// SUPPLIER_ID.Text = _SUPPLIER.SUPPLIER_NAME;
|
|
// }
|
|
//}
|
|
//catch { }
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|