Beispiel #1
0
    /// <summary>
    /// 保存明细
    /// </summary>
    private void UpdateMaterialOutDtl()
    {
        List <MaterialOutDtlModel> Models = GetScreenDtl();

        RmsPM.BFL.MaterialOutBFL bfl = new RmsPM.BFL.MaterialOutBFL();
        bfl.UpdateMaterialOutDtlList(Models, RmsPM.BLL.ConvertRule.ToInt(this.ViewState["MaterialOutCode"]));
    }
Beispiel #2
0
    protected void FormView1_DataBound(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.ReadOnly)
        {
            Button btnDelete = ((Button)this.FormView1.Row.FindControl("btnDelete"));
            if (btnDelete != null)
            {
                btnDelete.Attributes["OnClick"] = "javascript:return confirm('确实要删除当前材料吗?')";
            }
        }
        else
        {
            if (FormView1.CurrentMode == FormViewMode.Insert)
            {
                ((RmsPM.Web.UserControls.InputUser) this.FormView1.Row.FindControl("OutPersonBox")).Value = user.UserCode;
            }

            DataGrid dgDtl = (DataGrid)this.FormView1.Row.FindControl("dgDtl");
            if (dgDtl != null)
            {
                RmsPM.BFL.MaterialOutBFL bfl = new RmsPM.BFL.MaterialOutBFL();
                //Response.Write("<script>alert(this.ViewState['MaterialOutCode']);</script>");
                List <MaterialOutDtlModel> Models = bfl.GetMaterialOutDtlList(RmsPM.BLL.ConvertRule.ToInt(this.ViewState["MaterialOutCode"]));
                ViewState["Models"] = Models;
                BindDtl(Models);
            }
        }
    }