192 lines
6.9 KiB
C#
192 lines
6.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
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 Business = SuperMap.RealEstate.SendRec.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;
|
|
InitWebControls();
|
|
//初始化并加载列表
|
|
GridViewEx1.SelectingWithInit<Business.APPLYPROINST>(ObjectDataSource1, GridPageEx1,
|
|
DictionaryHelper.GetDictionary(Transaction, "APPLYPROINST_TYPE"));
|
|
//工具条按钮事件
|
|
//GridViewEx1.SetOpenControl(ButtonNew);
|
|
//设置回车焦点按钮
|
|
|
|
APPLYPROINST1.LoadData();
|
|
|
|
InitApproved();
|
|
}
|
|
|
|
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";
|
|
}
|
|
}
|
|
|
|
#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 = "双击查看详情";
|
|
|
|
//APPLYPROINST_TYPE APPLYPROINST_STATE 7
|
|
switch (e.Row.Cells[6].Text)
|
|
{
|
|
case "申购业务":
|
|
switch (e.Row.Cells[7].Text)
|
|
{
|
|
case "1000":
|
|
e.Row.Cells[7].Text = "申请填写";
|
|
break;
|
|
case "2000":
|
|
e.Row.Cells[7].Text = "部门负责人审核";
|
|
break;
|
|
case "3000":
|
|
e.Row.Cells[7].Text = "财务审核";
|
|
break;
|
|
case "4000":
|
|
e.Row.Cells[7].Text = "经理审批";
|
|
break;
|
|
default:
|
|
e.Row.Cells[7].Text = "办结"; break;
|
|
}
|
|
|
|
break;
|
|
case "入库业务":
|
|
switch (e.Row.Cells[7].Text)
|
|
{
|
|
case "1000":
|
|
e.Row.Cells[7].Text = "采购员填写";
|
|
break;
|
|
case "2000":
|
|
e.Row.Cells[7].Text = "验收员审核";
|
|
break;
|
|
case "3000":
|
|
e.Row.Cells[7].Text = "仓管审核";
|
|
break;
|
|
default:
|
|
e.Row.Cells[7].Text = "办结"; break;
|
|
}
|
|
break;
|
|
case "领料业务":
|
|
|
|
switch (e.Row.Cells[7].Text)
|
|
{
|
|
case "1000":
|
|
e.Row.Cells[7].Text = "领料填写";
|
|
break;
|
|
case "2000":
|
|
e.Row.Cells[7].Text = "仓管审核";
|
|
break;
|
|
case "3000":
|
|
e.Row.Cells[7].Text = "部门负责人审核";
|
|
break;
|
|
case "4000":
|
|
e.Row.Cells[7].Text = "财务审核";
|
|
break;
|
|
case "5000":
|
|
e.Row.Cells[7].Text = "经理审批";
|
|
break;
|
|
default:
|
|
e.Row.Cells[7].Text = "办结"; break;
|
|
}
|
|
break;
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 方法 -> 审批信息
|
|
private void InitApproved()
|
|
{
|
|
if(Request["ID"] !=null)
|
|
{
|
|
Business.APPLYPROINST _APPLYPROINST = new Business.APPLYPROINST();
|
|
_APPLYPROINST.APPLYPROINST_ID = int.Parse(Request["ID"].ToDecrypt());
|
|
if (_APPLYPROINST.Select())
|
|
{
|
|
foreach (DataRow _DataRow in _APPLYPROINST.GetApproved().Rows)
|
|
{
|
|
switch (_DataRow["APPROVED_TYPE"].ToString())
|
|
{
|
|
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;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
}
|