2026821
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using GThinking.N_MISPRO;
|
||||
using GThinking.N_MISPRO.Data;
|
||||
using GThinking.N_MODEL.Page;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
using GThinking.N_CONTROL;
|
||||
using GThinking.N_PUBLIC;
|
||||
using GThinking.N_PUBLIC2;
|
||||
using System.Collections.Generic;
|
||||
using GThinking.N_MISPRO.MISPROAS;
|
||||
using GThinking.N_WORKFLOW;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
public partial class XLBJD_CLHQList : OperationBase
|
||||
{
|
||||
XLXSBJCL_CLHQ entity = new XLXSBJCL_CLHQ();
|
||||
XLXSBJCL_WLHQ entity_mx = new XLXSBJCL_WLHQ();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860024;
|
||||
this.UMName = "线缆销售报价单料价";
|
||||
this.CurMaster = Master;
|
||||
this.Tabs = Tab;
|
||||
this.PageHeight = 500;
|
||||
this.PageWidth = 700;
|
||||
AddListSetMap(new ListSet(pagCLHQ.ID, null, grdCLHQ, entity, UPCLHQ));
|
||||
AddListSetMap(new ListSet(pagWLHQ.ID, null, grdWLHQ, entity_mx, updWLHQ));
|
||||
|
||||
|
||||
this.Master.PnlQuery.Visible = false;
|
||||
this.Master.PnlBill.Visible = false;
|
||||
this.Master.BtnQueryVisible = false;
|
||||
this.Master.BtnQuery.Visible = false;
|
||||
this.Master.BtnOK.Visible = false;
|
||||
this.Master.BtnCancel.Visible = false;
|
||||
|
||||
|
||||
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Master_OnQuery();
|
||||
GridDataBind();
|
||||
}
|
||||
|
||||
|
||||
InitGridView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 模板继承事件
|
||||
|
||||
protected override void Master_OnQuery()
|
||||
{
|
||||
string sBJRQ = PageParam.GetRTrimString("BJRQ");
|
||||
string sJGBID = PageParam.GetRTrimString("JGBID");
|
||||
string sBJDID = PageParam.GetRTrimString("BJDID");
|
||||
string sBJFLID = PageParam.GetRTrimString("BJFLID");
|
||||
string sBJDHQLY = PageParam.GetRTrimString("BJDHQLY");
|
||||
entity.sBJRQ = sBJRQ;
|
||||
entity.sJGBID = sJGBID;
|
||||
entity.sBJDID = sBJDID;
|
||||
entity.sBJFLID = sBJFLID;
|
||||
entity.sBJDHQLY = sBJDHQLY;
|
||||
if (Tab.ActiveTabIndex == 1)
|
||||
{
|
||||
entity_mx.sBJDID = sBJDID;
|
||||
entity_mx.sBJRQ = sBJRQ;
|
||||
//entity_mx.sBJCLID = grdCLHQ.GetCellByFieldName("BJCLID", grdCLHQ.Rows[grdCLHQ.SelectedIndex]).Text;
|
||||
entity_mx.sJGBID = sJGBID;
|
||||
|
||||
}
|
||||
base.Master_OnQuery();
|
||||
}
|
||||
|
||||
protected override bool ActiveTabChanging()
|
||||
{
|
||||
return base.ActiveTabChanging();
|
||||
}
|
||||
|
||||
protected override void ActiveTabChanged()
|
||||
{
|
||||
base.ActiveTabChanged();
|
||||
if (Tab.ActiveTabIndex == 1)
|
||||
{
|
||||
string sBJDID = PageParam.GetRTrimString("BJDID");
|
||||
string sBJRQ = PageParam.GetRTrimString("BJRQ");
|
||||
string sJGBID = PageParam.GetRTrimString("JGBID");
|
||||
MenuAreaUpdate();
|
||||
entity_mx.sBJDID = sBJDID;
|
||||
//entity_mx.sBJCLID = grdCLHQ.GetCellByFieldName("BJCLID", grdCLHQ.Rows[grdCLHQ.SelectedIndex]).Text;
|
||||
entity_mx.sBJRQ = sBJRQ;
|
||||
entity_mx.sJGBID = sJGBID;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuAreaUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void GridDataBind()
|
||||
{
|
||||
base.GridDataBind();
|
||||
}
|
||||
|
||||
protected override bool Master_OnBeforeOK(object sender, EventArgs e)
|
||||
{
|
||||
return base.Master_OnBeforeOK(sender, e);
|
||||
}
|
||||
|
||||
protected override bool DataLogicValid()
|
||||
{
|
||||
|
||||
return base.DataLogicValid();
|
||||
}
|
||||
|
||||
protected override void Grid_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
double dSX = CMISproConvert.StrToFloat(PageParam.GetRTrimString("BJDRQHQJCLSX"));
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (Tab.ActiveTabIndex == 0)
|
||||
{
|
||||
if ((e.Row.Cells[3].Text.Trim() != "") && (e.Row.Cells[3].Text.Trim() != " "))
|
||||
{
|
||||
if (e.Row.Cells[3].Text.Trim() == "1")
|
||||
{
|
||||
double dBJDJG = CMISproConvert.StrToFloat(e.Row.Cells[5].Text.Trim());
|
||||
|
||||
if (dBJDJG == 0)
|
||||
{
|
||||
e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6E69");
|
||||
}
|
||||
e.Row.Cells[3].Text = e.Row.Cells[3].Text.Trim() + "|" + "材料行情";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.Cells[3].Text = e.Row.Cells[3].Text.Trim() + "|" + "物料行情";
|
||||
}
|
||||
}
|
||||
if (dSX != 0)
|
||||
{
|
||||
double JCL = CMISproConvert.StrToFloat(e.Row.Cells[8].Text.Trim());
|
||||
if (JCL > dSX)
|
||||
e.Row.Cells[8].Attributes["BackColor"] = "#FF6E69";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
double dBJDJG = CMISproConvert.StrToFloat(e.Row.Cells[4].Text.Trim());
|
||||
|
||||
if (dBJDJG == 0)
|
||||
{
|
||||
e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml("#FF6E69");
|
||||
}
|
||||
if (dSX != 0)
|
||||
{
|
||||
double JCL = CMISproConvert.StrToFloat(e.Row.Cells[7].Text.Trim());
|
||||
if (JCL > dSX)
|
||||
e.Row.Cells[7].Attributes["BackColor"] = "#FF6E69";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.Grid_RowDataBound(sender, e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 自定义函数
|
||||
private void InitGridView()
|
||||
{
|
||||
bool BJGB_JGE = XLBJDUtils.IsJGEJGB(PageParam.GetRTrimString("JGBID"));
|
||||
grdCLHQ.FindColumnByFieldName("BJDWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("BJDHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("BJRQWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("BJRQHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("JGBWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("JGBHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("JRJWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdCLHQ.FindColumnByFieldName("JRJHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
|
||||
|
||||
grdWLHQ.FindColumnByFieldName("BJDWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("BJDHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("BJRQWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("BJRQHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("JGBWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("JGBHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("JRJWSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
grdWLHQ.FindColumnByFieldName("JRJHSJG").NumberDecimalPlace = XLBJDUtils.BJCLPriceDecimal;
|
||||
|
||||
if (BJGB_JGE)
|
||||
{
|
||||
//材料行情
|
||||
grdCLHQ.FindColumnByFieldName("JGBWSJG").Visible = false;
|
||||
grdCLHQ.FindColumnByFieldName("JGBHSJG").Visible = false;
|
||||
|
||||
grdCLHQ.FindColumnByFieldName("JRJWSJG").Visible = true;
|
||||
grdCLHQ.FindColumnByFieldName("JRJHSJG").Visible = true;
|
||||
grdCLHQ.FindColumnByFieldName("JRJWHR").Visible = true;
|
||||
grdCLHQ.FindColumnByFieldName("JRJWHSJ").Visible = true;
|
||||
|
||||
//物料行情
|
||||
grdWLHQ.FindColumnByFieldName("JGBWSJG").Visible = false;
|
||||
grdWLHQ.FindColumnByFieldName("JGBHSJG").Visible = false;
|
||||
|
||||
grdWLHQ.FindColumnByFieldName("JRJWSJG").Visible = true;
|
||||
grdWLHQ.FindColumnByFieldName("JRJHSJG").Visible = true;
|
||||
grdWLHQ.FindColumnByFieldName("JRJWHR").Visible = true;
|
||||
grdWLHQ.FindColumnByFieldName("JRJWHSJ").Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//材料行情
|
||||
grdCLHQ.FindColumnByFieldName("JGBWSJG").Visible = true;
|
||||
grdCLHQ.FindColumnByFieldName("JGBHSJG").Visible = true;
|
||||
|
||||
grdCLHQ.FindColumnByFieldName("JRJWSJG").Visible = false;
|
||||
grdCLHQ.FindColumnByFieldName("JRJHSJG").Visible = false;
|
||||
grdCLHQ.FindColumnByFieldName("JRJWHR").Visible = false;
|
||||
grdCLHQ.FindColumnByFieldName("JRJWHSJ").Visible = false;
|
||||
|
||||
//物料行情
|
||||
grdWLHQ.FindColumnByFieldName("JGBWSJG").Visible = true;
|
||||
grdWLHQ.FindColumnByFieldName("JGBHSJG").Visible = true;
|
||||
|
||||
grdWLHQ.FindColumnByFieldName("JRJWSJG").Visible = false;
|
||||
grdWLHQ.FindColumnByFieldName("JRJHSJG").Visible = false;
|
||||
grdWLHQ.FindColumnByFieldName("JRJWHR").Visible = false;
|
||||
grdWLHQ.FindColumnByFieldName("JRJWHSJ").Visible = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 控件事件
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user