You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
5.4 KiB
158 lines
5.4 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using CK.SCP.Models.Enums;
|
|
using CK.SCP.Models.ScpEntity;
|
|
using CK.SCP.Utils;
|
|
using CK.SCP.Controller;
|
|
using FineUI;
|
|
using SCP.Code;
|
|
|
|
namespace SCP.青岛一汽法雷奥.SupplierData
|
|
{
|
|
public partial class SCP_ASK_DETAIL : PageBase
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
GetV_TB_POData();
|
|
BindDetail();
|
|
SetRoleRule();
|
|
TranslatorAgents(Toolbar2);
|
|
TranslatorAgent(Grid_V_TB_ASK_DETAIL);
|
|
TranslatorAgents(FormRow_1);
|
|
TranslatorAgents(FormRow_2);
|
|
TranslatorAgents(FormRow_3);
|
|
}
|
|
}
|
|
|
|
private void SetRoleRule()
|
|
{
|
|
IsPriceVisible(Grid_V_TB_ASK_DETAIL, "价格");
|
|
}
|
|
|
|
|
|
private void BindResource()
|
|
{
|
|
|
|
BTN_refresh.Text = GetNameByKey(BTN_refresh.Text);
|
|
//this.btnCompleteForce.Text = GetNameByKey(btnCompleteForce.Text);
|
|
////this.btnConfirm.Text = GetNameByKey(this.btnConfirm.Text);
|
|
//this.btnReject.Text = GetNameByKey(this.btnReject.Text);
|
|
//this.btnRelease.Text = GetNameByKey(this.btnRelease.Text);
|
|
//this.BTN_SAVE.Text = GetNameByKey(this.BTN_SAVE.Text);
|
|
//this.btnCompleteForce.Text = GetNameByKey(this.btnCompleteForce.Text);
|
|
//txtRemark.Label = GetNameByKey(txtRemark.Label);
|
|
TXT_PoBillNum.Label = GetNameByKey(TXT_PoBillNum.Label);
|
|
TXT_Site.Label = GetNameByKey(TXT_Site.Label);
|
|
TXT_State_DESC.Label = GetNameByKey(TXT_State_DESC.Label);
|
|
TXT_VendName.Label = GetNameByKey(TXT_VendName.Label);
|
|
DP_BeginTime.Label = GetNameByKey(DP_BeginTime.Label);
|
|
//DP_EndTime.Label = GetNameByKey(DP_EndTime.Label);
|
|
|
|
foreach (var itm in Grid_V_TB_ASK_DETAIL.Columns)
|
|
{
|
|
GetNameByKey(itm.HeaderText);
|
|
|
|
}
|
|
|
|
}
|
|
public void SearchV_TB_ASK_DETAILData(Action<IQueryable<V_TB_ASK_DETAIL>> p_action)
|
|
{
|
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL();
|
|
_entity.AskBillNum= Request["AskBillNum"];
|
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_DETAIL_List(_entity, (_ret) => {
|
|
if (_ret.State == ReturnStatus.Succeed)
|
|
{
|
|
p_action(_ret.Result);
|
|
}
|
|
});
|
|
}
|
|
|
|
public void GetV_TB_POData()
|
|
{
|
|
V_TB_ASK _entity = new V_TB_ASK();
|
|
_entity.AskBillNum = Request["AskBillNum"];
|
|
//_entity.UserInAddress = CurrentUser.FactoryList;
|
|
_entity.UserInVendIds = CurrentUser.VenderList;
|
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) =>
|
|
{
|
|
if (_ret.State == ReturnStatus.Succeed)
|
|
{
|
|
var _result = _ret.Result.FirstOrDefault();
|
|
Session["Ask"] = _result;
|
|
this.TXT_PoBillNum.Text = _result.PoBillNum;
|
|
this.TXT_Site.Text = _result.Site_Desc;
|
|
this.TXT_State_DESC.Text = _result.State_DESC;
|
|
TXT_ModType.Text = _result.ModType.ToString();
|
|
this.TXT_VendName.Text = _result.VendName;
|
|
this.txtRemark.Text = _result.Remark;
|
|
DP_BeginTime.SelectedDate = _result.BeginTime;
|
|
|
|
}
|
|
});
|
|
}
|
|
public void BindDetail()
|
|
{
|
|
SearchV_TB_ASK_DETAILData((ret) => {
|
|
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count();
|
|
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL);
|
|
Grid_V_TB_ASK_DETAIL.DataSource = list;
|
|
Grid_V_TB_ASK_DETAIL.DataBind();
|
|
});
|
|
}
|
|
|
|
|
|
protected void btnOutput_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
protected void btnConfirm_Click(object sender, EventArgs e)
|
|
{
|
|
SET_ASK_STATE("供应商确认成功!", AskState.Confirm);
|
|
}
|
|
|
|
|
|
private void SET_ASK_STATE(string p_msg,AskState p_state)
|
|
{
|
|
if (Session["Ask"] != null)
|
|
{
|
|
var _ask = Session["Ask"] as V_TB_ASK;
|
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(new List<string>() { _ask.AskBillNum },p_state);
|
|
if (ret.State == ReturnStatus.Succeed)
|
|
{
|
|
Alert.Show(p_msg);
|
|
GetV_TB_POData();
|
|
BindDetail();
|
|
}
|
|
else
|
|
{
|
|
Alert.Show(ret.Message);
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Grid_V_TB_ASK_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
|
|
{
|
|
BindDetail();
|
|
}
|
|
|
|
|
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
|
|
|
|
BindDetail();
|
|
}
|
|
|
|
protected void btnNoConfirm_Click(object sender, EventArgs e)
|
|
{
|
|
SET_ASK_STATE("取消确认成功!", AskState.NoConfirm);
|
|
}
|
|
}
|
|
}
|