예제 #1
0
파일: UsersForm.cs 프로젝트: Teo27/Eflats
        //------------------------------------------------------------------------------------
        //private methods

        private void GetDataSetToGrid()
        {
            try
            {
                clientAdmin = new EFlatsServiceReference.WcfEFlatsServiceAdminClient("NetTcpBinding_IWcfEFlatsServiceAdmin");
                //load table
                ds = new DataSet();
                ds = clientAdmin.AdminGetTableData(cbType.SelectedItem.ToString().Trim());
                BindingSource bSource = new BindingSource();
                bSource.DataSource          = ds.Tables[0];
                dataGridViewUser.DataSource = bSource;

                SetColumnsReadOnly();
            }
            catch
            {
                lblOutput.Text = "Unable to connect to the Database";
            }
        }
예제 #2
0
        //private methods
        private void GetDataSetToGrid()
        {
            try
            {
                //refresh connection to client
                clientAdmin = new EFlatsServiceReference.WcfEFlatsServiceAdminClient("NetTcpBinding_IWcfEFlatsServiceAdmin");
                //load table
                ds = clientAdmin.AdminGetTableData("Flats");
                BindingSource bSource = new BindingSource();
                bSource.DataSource      = ds.Tables[0];
                dataGridView.DataSource = bSource;

                ds.Tables[0].Columns["Id"].ReadOnly = true;
            }
            catch
            {
                lblOutput.Text = "Unable to connect to the Database";
            }
        }
예제 #3
0
        private void GetDataSetToGrid()
        {
            //load table
            try
            {
                ds = new DataSet();
                ds = clientAdmin.AdminGetTableData("Applications");
                BindingSource bSource = new BindingSource();
                bSource.DataSource      = ds.Tables[0];
                dataGridView.DataSource = bSource;

                ds.Tables[0].Columns["Id"].ReadOnly             = true;
                ds.Tables[0].Columns["DateOfCreation"].ReadOnly = true;
                ds.Tables[0].Columns["Score"].ReadOnly          = true;
                ds.Tables[0].Columns["QueueNumber"].ReadOnly    = true;
            }
            catch
            {
                lblOutput.Text = "Unable to connect to the Database";
            }
        }
예제 #4
0
        //------------------------------------------------------------------------------------
        //private methods
        private void GetDataSetToGrid()
        {
            try
            {
                clientAdmin = new EFlatsServiceReference.WcfEFlatsServiceAdminClient("NetTcpBinding_IWcfEFlatsServiceAdmin");
                //load table
                ds = new DataSet();
                ds = clientAdmin.AdminGetTableData(cbType.SelectedItem.ToString().Trim());
                BindingSource bSource = new BindingSource();
                bSource.DataSource = ds.Tables[0];
                dataGridViewUser.DataSource = bSource;

                SetColumnsReadOnly();
            }
            catch
            {
                lblOutput.Text = "Unable to connect to the Database";
            }
        }
예제 #5
0
        //private methods
        private void GetDataSetToGrid()
        {
            try
            {
                //refresh connection to client
                clientAdmin = new EFlatsServiceReference.WcfEFlatsServiceAdminClient("NetTcpBinding_IWcfEFlatsServiceAdmin");
                //load table
                ds = clientAdmin.AdminGetTableData("Flats");
                BindingSource bSource = new BindingSource();
                bSource.DataSource = ds.Tables[0];
                dataGridView.DataSource = bSource;

                ds.Tables[0].Columns["Id"].ReadOnly = true;
            }
            catch
            {
                lblOutput.Text = "Unable to connect to the Database";
            }
        }