• 操作平台的gridview


    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);
    }
    }
    }

  • 相关阅读:
    Tornado session 插件 pycket 定制时间和时间续租
    为Tornado框架加上基于Redis或Memcached的session 【第三方】
    正则表达式大全 --【Python举例】
    Django 最好的缓存memcached的使用 小记
    Django 1.9 admin 使用suit 小记
    IntelliJ IDEA 注册码
    Python 爬虫抓取代理IP,并检测联通性
    MySQL自定义函数
    css补充知识
    sqlalchemy 知识补充
  • 原文地址:https://www.cnblogs.com/nuaaydh/p/4523838.html
Copyright © 2020-2023  润新知