)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » InventoryForDataGridView (Ia.Ftn.Cl.Models.Ui)

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

Inventory For DataGridView support class for Fixed Telecommunications Network (FTN) ui model.

    1: using System;
    2: using System.Collections.Generic;
    3: using System.Linq;
    4:  
    5: namespace Ia.Ftn.Cl.Models.Ui
    6: {
    7:     ////////////////////////////////////////////////////////////////////////////
    8:  
    9:     /// <summary publish="true">
   10:     /// Inventory For DataGridView support class for Fixed Telecommunications Network (FTN) ui model.
   11:     /// </summary>
   12:     /// 
   13:     /// <remarks> 
   14:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   15:     /// </remarks> 
   16:     public class InventoryForDataGridView
   17:     {
   18:         /// <summary/>
   19:         public int Id { get; set; }
   20:  
   21:         /// <summary/>
   22:         public string Name { get; set; }
   23:  
   24:         /// <summary/>
   25:         public string CompanyName { get; set; }
   26:  
   27:         /// <summary/>
   28:         public string Description { get; set; }
   29:  
   30:         /// <summary/>
   31:         public string BarCode { get; set; }
   32:  
   33:         /// <summary/>
   34:         public int Quantity { get; set; }
   35:  
   36:         /// <summary/>
   37:         public DateTime Created { get; set; }
   38:  
   39:         /// <summary/>
   40:         public DateTime Updated { get; set; }
   41:  
   42:         ////////////////////////////////////////////////////////////////////////////
   43:  
   44:         /// <summary>
   45:         ///
   46:         /// </summary>
   47:         public static List<Ia.Ftn.Cl.Models.Ui.InventoryForDataGridView> ReadUiList()
   48:         {
   49:             List<Ia.Ftn.Cl.Models.Ui.InventoryForDataGridView> inventoryForDataGridView;
   50:  
   51:             using (var db = new Ia.Ftn.Cl.Db())
   52:             {
   53:                 inventoryForDataGridView = (from i in db.Inventories select i).AsEnumerable().Select(q => new InventoryForDataGridView
   54:                 {
   55:                     Id = q.Id,
   56:                     Name = q.Name,
   57:                     CompanyName = Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.VendorNameFromId(q.Company),
   58:                     Description = q.Description,
   59:                     BarCode = q.BarCode,
   60:                     Quantity = q.Quantity,
   61:                     Created = q.Created,
   62:                     Updated = q.Updated
   63:                 }).ToList();
   64:             }
   65:  
   66:             return inventoryForDataGridView;
   67:         }
   68:  
   69:         ////////////////////////////////////////////////////////////////////////////
   70:         ////////////////////////////////////////////////////////////////////////////
   71:     }
   72:  
   73:     ////////////////////////////////////////////////////////////////////////////
   74:     ////////////////////////////////////////////////////////////////////////////
   75: }