Exemple #1
0
        public void StartBindingData()
        {
            var result = ContactsDAL.GetAll();

            if (result.Code < 0)
            {
                lbError.InnerText = result.ErrorMessage;
                lbError.Visible   = true;
            }

            lbError.Visible = false;
            //---
            _dataSource = result.Data.Tables[0];
            grvContactsItems.DataSource   = result.Data;
            grvContactsItems.DataKeyNames = new string[] { "Id" };
            grvContactsItems.DataBind();
        }