Пример #1
0
    // private YuyueLimit yuyueLimit;

    private void ReBind()
    {
        YuyueLimit entity = YuyueLimitOperator.Get(Convert.ToInt32(this.hidPaiBanId.Value));
        string     sql    = "select id,c_lsh,c_idcard,c_xm,date_pxshrq,c_hmhp,c_jbr,decode(i_checked,0,'未审核',1,'已审核',2,'审核不过') i_checked,c_check_result from table_yuyue_info"
                            + "  where (i_checked<>2 or i_checked is null) and i_paibanid=" + entity.Id;

        dt = DataAccessFactory.GetDataAccess().SelectDataTable(sql, "tmp");
        if (dt != null)
        {
            this.trueNum = dt.Rows.Count;
        }
        else
        {
            dt           = MockDataTable();
            this.trueNum = 0;
        }
        int num = entity.Total + entity.TpTotal - trueNum;

        for (int i = 0; i < num; i++)
        {
            dt.Rows.Add(dt.NewRow());
        }
        this.DataGrid1.DataSource = dt;
        this.DataGrid1.DataBind();

        sql = "select id,c_lsh,c_idcard,c_xm,date_pxshrq,c_hmhp,c_jbr,decode(i_checked,0,'未审核',1,'已审核',2,'审核不过') i_checked,c_check_result from table_yuyue_info"
              + "  where i_checked=2 and i_paibanid=" + entity.Id;
        dt = DataAccessFactory.GetDataAccess().SelectDataTable(sql, "tmp");
        if (dt != null)
        {
            this.DataGrid2.DataSource = dt;
            this.DataGrid2.DataBind();
        }
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DictOperator.BindDropDownList("考试地点", this.cbKsdd);
         DictOperator.BindDropDownList("考试场次", this.cbKscc);
         // SchoolCarInfoOperator.Bind(this.cbCarNo, this.Operator.Desp3);
         if (Request.Params["id"] != null)
         {
             YuyueLimit entity = YuyueLimitOperator.Get(Convert.ToInt32(Request.Params["id"]));
             //this.yuyueLimit = entity;
             this.InitYuyueLimit(entity);
         }
     }
 }
Пример #3
0
    protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Tp")
        {
            int tp = 0;
            try
            {
                tp = Convert.ToInt32(this.txtNum.Text.Trim());
            }
            catch (Exception ex)
            {
                WebTools.Alert(this, "特批数量必须是整数!");
                return;
            }
            int        id    = Convert.ToInt32(e.CommandArgument);
            YuyueLimit limit = YuyueLimitOperator.Get(id);
            limit.TpTotal = tp;

            YuyueLimitOperator.Update(limit);
            WebTools.Alert(this, "特批成功!");
            this.ProcedurePager1.Changed = true;
        }
    }