using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL;
|
using CY.Model;
|
using CY.Infrastructure.Query;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Sys;
|
using CY.BLL.OA;
|
using CY.BLL.EC;
|
using CY.BLL.Inquiry;
|
using CY.Model.Inquiry;
|
using System.Drawing;
|
|
namespace CY.WebForm.APP.Pages
|
{
|
public partial class DeliverSignList : BasePageApp
|
{
|
|
OA_DeliverPlanBLL _OA_DeliverPlanBLL = null;
|
OA_StaffBLL bll_OA_StaffBLL = null;
|
OA_CarManageBll _OA_CarManageBll = null;
|
|
|
|
//初始化
|
public DeliverSignList()
|
{
|
|
_OA_DeliverPlanBLL = new OA_DeliverPlanBLL();
|
bll_OA_StaffBLL = new OA_StaffBLL();
|
_OA_CarManageBll = new OA_CarManageBll();
|
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
if (!IsPostBack)
|
{
|
|
|
|
InitialSelectData();
|
BindList();
|
// Response.End();
|
}
|
}
|
|
|
//加载查询条件
|
protected void InitialSelectData()
|
{
|
|
|
this.Button1.Text = DateTime.Now.ToString("yyyy-MM-dd");
|
this.Button2.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
|
this.Button3.Text = DateTime.Now.AddDays(2).ToString("yyyy-MM-dd");
|
this.Button4.Text = DateTime.Now.AddDays(3).ToString("yyyy-MM-dd");
|
this.Button5.Text = DateTime.Now.AddDays(4).ToString("yyyy-MM-dd");
|
this.Button6.Text = DateTime.Now.AddDays(5).ToString("yyyy-MM-dd");
|
this.Button7.Text = DateTime.Now.AddDays(6).ToString("yyyy-MM-dd");
|
|
|
//this.DriverId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, null, null).Where(x => x.SM_Post.Equals("驾驶员"));
|
//this.DriverId.DataTextField = "Name";
|
//this.DriverId.DataValueField = "Keyid";
|
//this.DriverId.DataBind();
|
//this.DriverId.Items.Insert(0, new ListItem("请选择", ""));
|
|
//this.CarId.DataSource = _OA_CarManageBll.SelectListByFirmId(CurrentUser.MemberId);
|
//this.CarId.DataTextField = "CarNumber";
|
//this.CarId.DataValueField = "Keyid";
|
//this.CarId.DataBind();
|
//this.CarId.Items.Insert(0, new ListItem("请选择", ""));
|
|
}
|
|
//分页事件
|
protected void AspNetPager1_PageChanged(object src, EventArgs e)
|
{
|
BindList();
|
}
|
|
//查询事件
|
protected void btn_Search_Click(object sender, EventArgs e)
|
{
|
BindList();
|
}
|
|
protected void btn_Search_Click1(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button1.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click2(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button2.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click3(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button3.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click4(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button4.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click5(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button5.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click6(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button6.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click7(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button7.Text;
|
|
BindList();
|
}
|
|
//绑定列表
|
private void BindList()
|
{
|
if (this.txtDeliveryTime.Value == "")
|
{
|
this.txtDeliveryTime.Value = this.Button1.Text;
|
}
|
if (this.txtDeliveryTime.Value == this.Button1.Text)
|
{
|
this.Button1.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button2.Text)
|
{
|
this.Button2.BorderColor = Color.Black;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button3.Text)
|
{
|
this.Button3.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button4.Text)
|
{
|
this.Button4.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button5.Text)
|
{
|
this.Button5.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button6.Text)
|
{
|
this.Button6.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button7.Text)
|
{
|
this.Button7.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
}
|
|
|
|
Pagination pa = new Pagination();
|
pa.PageSize = 1000;
|
pa.PageIndex = 1;
|
|
IEnumerable<OA_DeliverPlan> oA_DeliverPlans = _OA_DeliverPlanBLL.SelectModelPage(pa,
|
CurrentUser.MemberId,
|
this.txtDeliveryTime.Value,
|
"",
|
"",
|
CurrentUser.TrueMemberId.ToString()
|
);
|
foreach(var oA_DeliverPlan in oA_DeliverPlans)
|
{
|
if (!oA_DeliverPlan.DeliveredTime.HasValue)
|
{
|
oA_DeliverPlan.qianshou = "<a href='javascript:void(0)' class='a_under' onclick='View(\""+ oA_DeliverPlan.Keyid + "\",\"" + oA_DeliverPlan.BuyerName + "\")' >点击签收 </a> ";
|
}
|
else
|
{
|
oA_DeliverPlan.qianshou = oA_DeliverPlan.DeliveredTime.Value.ToString("yyyy-MM-dd");
|
}
|
}
|
|
|
|
this.RepClientList.DataSource = oA_DeliverPlans;
|
|
|
|
this.RepClientList.DataBind();
|
|
}
|
|
|
|
|
|
}
|
}
|