You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
4.0 KiB
C#
118 lines
4.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Estsh.Web.Util;
|
|
using System.Data;
|
|
using Estsh.Web.Dal;
|
|
using System.Collections;
|
|
using Estsh.Web.Models;
|
|
using ApServerProvider;
|
|
|
|
/***************************************************************************************************
|
|
*
|
|
* 作者:王勇
|
|
*
|
|
* *************************************************************************************************/
|
|
namespace Estsh.Core.Services
|
|
{
|
|
/// <summary>
|
|
/// 菜单业务处理类
|
|
/// </summary>
|
|
public class XTShipShiftDefineService
|
|
{
|
|
private XTShipShiftDefineDal dal = new XTShipShiftDefineDal(RemotingProxyProvider._remotingProxy);
|
|
|
|
/// <summary>
|
|
/// 根据分页条件获取分页菜单数据
|
|
/// </summary>
|
|
/// <param name="XTShipShiftDefineName"></param>
|
|
/// <param name="pager"></param>
|
|
/// <param name="direction"></param>
|
|
/// <param name="sort"></param>
|
|
/// <returns></returns>
|
|
public Hashtable getXTShipShiftDefineListByPage( Pager pager, String direction, String sort, string cbModelName, string SN,String txtStartTime, String txtEndTime, string status)
|
|
{
|
|
Hashtable result = new Hashtable();
|
|
string strWhere = " 1=1 ";
|
|
|
|
String orderBy = "part_id";
|
|
result = dal.getListByPage(pager.pageSize, pager.pageNo, orderBy, strWhere);
|
|
|
|
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 配置集合
|
|
/// </summary>
|
|
/// <returns>数据集</returns>
|
|
public ArrayList GetModelName()
|
|
{
|
|
return dal.GetModelName();
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 查看详情
|
|
/// </summary>
|
|
/// <param name="ruid"></param>
|
|
/// <returns></returns>
|
|
public ArrayList getXTShipShiftDefine(String part_id)
|
|
{
|
|
part_id = "part_id = " + part_id;
|
|
DataTable dt = dal.getList(part_id, "");
|
|
ArrayList result = DataTypeConvert.NewObject.DataTableToArrayList(dt);
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据分页条件获取分页菜单数据
|
|
/// </summary>
|
|
/// <param name="menuName">查询条件</param>
|
|
/// <param name="pager"></param>
|
|
/// <param name="direction">排序方式</param>
|
|
/// <param name="sort">排序字段</param>
|
|
/// <returns></returns>
|
|
public DataTable getTableListByPage(Pager pager, String direction, String sort, Boolean isPage, string cbModelName, string SN, String txtStartTime, String txtEndTime, string status)
|
|
{
|
|
DataTable result = null;
|
|
|
|
string strWhere = " 1=1 ";
|
|
if (!string.IsNullOrEmpty(SN))
|
|
{
|
|
strWhere += " and a.serial_number = '" + SN + "' ";
|
|
}
|
|
if (!string.IsNullOrEmpty(cbModelName))
|
|
{
|
|
strWhere += " and b.model_id = '" + cbModelName + "' ";
|
|
}
|
|
if (!string.IsNullOrEmpty(txtStartTime))
|
|
{
|
|
strWhere += " and a.create_ymd >= '" + txtStartTime + "' ";
|
|
}
|
|
if (!string.IsNullOrEmpty(txtEndTime))
|
|
{
|
|
strWhere += " and a.create_ymd <= '" + txtEndTime + "' ";
|
|
}
|
|
|
|
String orderBy = " a.create_ymd,a.create_hms desc ";
|
|
if (status == "2")
|
|
{
|
|
strWhere += " and a.status = " + status + " ";
|
|
result = dal.getNoPlanedgetexport(pager.pageSize, pager.pageNo, orderBy, strWhere);
|
|
}
|
|
else if (!string.IsNullOrEmpty(status))
|
|
{
|
|
strWhere += " and a.status = '" + status + "' ";
|
|
result = dal.getListByPageexport(pager.pageSize, pager.pageNo, orderBy, strWhere);
|
|
}
|
|
else
|
|
{
|
|
result = dal.getListByPageexport(pager.pageSize, pager.pageNo, orderBy, strWhere);
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
} |