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

            if (pmsMinconclutionList != null)
            {
                GridViewConclusion.DataSource = pmsMinconclutionList;
                GridViewConclusion.DataBind();
            }
        }
Exemplo n.º 2
0
 private void GridViewBind(IEnumerable <PmsMinconclution> pmsMinconclutionList)
 {
     if (pmsMinconclutionList == null || pmsMinconclutionList.Count() == 0)
     {
         pmsMinconclutionList = new List <PmsMinconclution>()
         {
             new PmsMinconclution()
         };
         GridViewConclusion.DataSource = pmsMinconclutionList;
         GridViewConclusion.DataBind();
         GridViewConclusion.Rows[0].Visible = false; //隐藏了一行需要特别注意,保存的时候排除掉
     }
     else
     {
         GridViewConclusion.DataSource = pmsMinconclutionList;
         GridViewConclusion.DataBind();
     }
 }
Exemplo n.º 3
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; //隐藏了一行需要特别注意,保存的时候排除掉
            }
        }