Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » InventoryForDataGridView

Public general use code classes and xml files that we've compiled and used over the years:

Inventory For DataGridView support class for Next Generation Network (NGN) ui model.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.Security;
   6:   
   7:  namespace Ia.Ngn.Cl.Model.Ui
   8:  {
   9:      ////////////////////////////////////////////////////////////////////////////
  10:   
  11:      /// <summary publish="true">
  12:      /// Inventory For DataGridView support class for Next Generation Network (NGN) ui model.
  13:      /// </summary>
  14:      /// 
  15:      /// <remarks> 
  16:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  17:      ///
  18:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  19:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  20:      ///
  21:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  22:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  23:      /// 
  24:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  25:      /// 
  26:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  27:      /// </remarks> 
  28:      public partial class InventoryForDataGridView
  29:      {
  30:          /// <summary/>
  31:          public int Id { get; set; }
  32:   
  33:          /// <summary/>
  34:          public string Name { get; set; }
  35:   
  36:          /// <summary/>
  37:          public string CompanyName { get; set; }
  38:   
  39:          /// <summary/>
  40:          public string Description { get; set; }
  41:   
  42:          /// <summary/>
  43:          public string BarCode { get; set; }
  44:   
  45:          /// <summary/>
  46:          public int Quantity { get; set; }
  47:   
  48:          /// <summary/>
  49:          public DateTime Created { get; set; }
  50:   
  51:          /// <summary/>
  52:          public DateTime Updated { get; set; }
  53:   
  54:          ////////////////////////////////////////////////////////////////////////////
  55:   
  56:          /// <summary>
  57:          ///
  58:          /// </summary>
  59:          public static List<Ia.Ngn.Cl.Model.Ui.InventoryForDataGridView> ReadUiList()
  60:          {
  61:              List<Ia.Ngn.Cl.Model.Ui.InventoryForDataGridView> inventoryForDataGridView;
  62:   
  63:              using (var db = new Ia.Ngn.Cl.Model.Ngn())
  64:              {
  65:                  inventoryForDataGridView = (from i in db.Inventory select i).AsEnumerable().Select(q => new InventoryForDataGridView
  66:                                              {
  67:                                                  Id = q.Id,
  68:                                                  Name = q.Name,
  69:                                                  CompanyName = Ia.Ngn.Cl.Model.Business.NetworkDesignDocument.Vendor.VendorNameFromId(q.Company),
  70:                                                  Description = q.Description,
  71:                                                  BarCode = q.BarCode,
  72:                                                  Quantity = q.Quantity,
  73:                                                  Created = q.Created,
  74:                                                  Updated = q.Updated
  75:                                              }).ToList();
  76:              }
  77:   
  78:              return inventoryForDataGridView;
  79:          }
  80:   
  81:          ////////////////////////////////////////////////////////////////////////////
  82:          ////////////////////////////////////////////////////////////////////////////
  83:      }
  84:   
  85:      ////////////////////////////////////////////////////////////////////////////
  86:      ////////////////////////////////////////////////////////////////////////////
  87:  }