Пример #1
0
        public jsResponse<EmployeesCollection, Employees> EmployeesCollection_LoadAll()
        {
            jsResponse<EmployeesCollection, Employees> response = new jsResponse<EmployeesCollection, Employees>();

            try
            {
                EmployeesQuery q = new EmployeesQuery();
                q.Select(q.EmployeeID, q.FirstName, q.LastName);

                EmployeesCollection collection = new EmployeesCollection();
                collection.Load(q);

                if(collection.Count == 0)
                {
                    EnsureData();

                    collection = new EmployeesCollection();
                    collection.LoadAll();
                }

                response.collection = collection;
            }
            catch (Exception ex)
            {
                response.exception = ex.Message;
            }

            return response;
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            coll = new EmployeesCollection();
            coll.LoadAll();

            _bindingSource.DataSource = coll;
        }
Пример #3
0
        public EmployeesCollection.EmployeesCollectionWCFPacket Employees_LoadAll()
        {
            EmployeesCollection coll = new EmployeesCollection();
            if (coll.LoadAll())
            {
                return coll;
            }

            return null;
        }
Пример #4
0
 private void LoadGrid()
 {
     try
     {
         coll = new EmployeesCollection();
         if (coll.LoadAll())
         {
             grid.DataSource = coll;
         }
     }
     catch (Exception ex)
     {
         throw;
         //string error = ex.Message;
     }
 }
		public EmployeesCollectionProxyStub Employees_LoadAll()
		{
			EmployeesCollection coll = new EmployeesCollection();
			if (coll.LoadAll())
			{
				return coll;
			}

			return null;
		}		
		public EmployeesCollection Employees_LoadAll()
		{
			EmployeesCollection coll = new EmployeesCollection();
			coll.es.IsLazyLoadDisabled = true;
			coll.LoadAll();
			return coll;
		}
		public jsResponse<EmployeesCollection, Employees> EmployeesCollection_LoadAll()
		{
			jsResponse<EmployeesCollection, Employees> response = new jsResponse<EmployeesCollection, Employees>();

			try
			{
				EmployeesCollection collection = new EmployeesCollection();
				collection.LoadAll();
				response.collection = collection;
			}
			catch (Exception ex)
			{
				response.exception = ex.Message;
			}

			return response;
		}
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            btnAdd.Enabled = true;
            btnDelete.Enabled = true;
            btnSave.Enabled = true;

            coll = new EmployeesCollection();
            coll.LoadAll();

            _bindingSource.DataSource = coll;
        }