private void SetGrid()
{
string controlValue = this._page.GetControlValue("val_PF_NO");
GridView mainGrid = this._page.get_MainGrid();
foreach (GridViewRow gridViewRow in mainGrid.Rows)
{
if (controlValue == "3")
{
TextBox textBoxInGridCell = this._page.GetTextBoxInGridCell(gridViewRow.RowIndex, "PF_ADJ");
textBoxInGridCell.Enabled = false;
textBoxInGridCell = this._page.GetTextBoxInGridCell(gridViewRow.RowIndex, "PF_ADJRATIO");
textBoxInGridCell.Enabled = false;
}
else
{
if (this._page.GetRowDataByKey(gridViewRow.RowIndex, "U_TYPE") == "入口")
{
TextBox textBoxInGridCell = this._page.GetTextBoxInGridCell(gridViewRow.RowIndex, "PF_ADJ");
textBoxInGridCell.Enabled = false;
textBoxInGridCell = this._page.GetTextBoxInGridCell(gridViewRow.RowIndex, "PF_ADJRATIO");
textBoxInGridCell.Enabled = false;
break;
}
}
}
}
private void CheckData()
{
double num = 0.0;
double num2 = 0.0;
GridView mainGrid = this._page.get_MainGrid();
foreach (GridViewRow gridViewRow in mainGrid.Rows)
{
if (this._page.GetRowDataByKey(gridViewRow.RowIndex, "U_TYPE") == "入口")
{
num = ConvertFunction.ObjToDouble(this._page.GetRowDataByKey(gridViewRow.RowIndex, "PF_ADJ"));
}
else
{
if (this._page.GetRowDataByKey(gridViewRow.RowIndex, "U_TYPE") == "出口")
{
num2 += ConvertFunction.ObjToDouble(this._page.GetRowDataByKey(gridViewRow.RowIndex, "PF_ADJ"));
}
else
{
if (this._page.GetRowDataByKey(gridViewRow.RowIndex, "U_TYPE") == "损失")
{
num2 += ConvertFunction.ObjToDouble(this._page.GetRowDataByKey(gridViewRow.RowIndex, "PF_ADJ"));
}
}
}
}
if (num != num2)
{
this._page.ShowMessage("处理量不等于生产量与损失之和");
}
}
public void RefreshPage()
{
string s = "<script type='text/javascript'> var para=document.all.val_PF_NO.value;
if(para==3){ pWindow.cardframe.subinfoframe.gridframe.document.all.btnSave.disabled='disabled';}</script>";
this._page.Response.Write(s);
}
}
}