예제 #1
0
        private void BindGrid()
        {
            // 到数据库捞取
            PmsMinconclutionBiz      pmsMinconclutionBiz  = new PmsMinconclutionBiz();
            IList <PmsMinconclution> pmsMinconclutionList = pmsMinconclutionBiz.SelectPmsMinconclutionByMinId(MinID);

            if (pmsMinconclutionList != null)
            {
                GridViewConclusion.DataSource = pmsMinconclutionList;
                GridViewConclusion.DataBind();
            }
        }
예제 #2
0
        /// <summary>
        ///  For Page_Load
        /// </summary>
        private void BindGrid()
        {
            // 到数据库捞取
            PmsMinconclutionBiz      pmsMinconclutionBiz  = new PmsMinconclutionBiz();
            IList <PmsMinconclution> pmsMinconclutionList = pmsMinconclutionBiz.SelectPmsMinconclutionByMinId(MinID);

            InitPmsMinconclutionList = pmsMinconclutionList; //编辑前的数据保存到InitPmsMinconclutionList
            if (pmsMinconclutionList != null && pmsMinconclutionList.Count > 0)
            {
                GridViewConclusion.DataSource = pmsMinconclutionList;
                GridViewConclusion.DataBind();
            }
            else
            {
                pmsMinconclutionList = new List <PmsMinconclution>()
                {
                    new PmsMinconclution()
                };
                GridViewConclusion.DataSource = pmsMinconclutionList;
                GridViewConclusion.DataBind();
                GridViewConclusion.Rows[0].Visible = false; //隐藏了一行需要特别注意,保存的时候排除掉
            }
        }