)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
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:     ///
   16:     /// 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
   17:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   18:     ///
   19:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   20:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   21:     /// 
   22:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   23:     /// 
   24:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   25:     /// </remarks> 
   26:     public class InventoryForDataGridView
   27:     {
   28:         /// <summary/>
   29:         public int Id { get; set; }
   30:  
   31:         /// <summary/>
   32:         public string Name { get; set; }
   33:  
   34:         /// <summary/>
   35:         public string CompanyName { get; set; }
   36:  
   37:         /// <summary/>
   38:         public string Description { get; set; }
   39:  
   40:         /// <summary/>
   41:         public string BarCode { get; set; }
   42:  
   43:         /// <summary/>
   44:         public int Quantity { get; set; }
   45:  
   46:         /// <summary/>
   47:         public DateTime Created { get; set; }
   48:  
   49:         /// <summary/>
   50:         public DateTime Updated { get; set; }
   51:  
   52:         ////////////////////////////////////////////////////////////////////////////
   53:  
   54:         /// <summary>
   55:         ///
   56:         /// </summary>
   57:         public static List<Ia.Ftn.Cl.Models.Ui.InventoryForDataGridView> ReadUiList()
   58:         {
   59:             List<Ia.Ftn.Cl.Models.Ui.InventoryForDataGridView> inventoryForDataGridView;
   60:  
   61:             using (var db = new Ia.Ftn.Cl.Db())
   62:             {
   63:                 inventoryForDataGridView = (from i in db.Inventories select i).AsEnumerable().Select(q => new InventoryForDataGridView
   64:                 {
   65:                     Id = q.Id,
   66:                     Name = q.Name,
   67:                     CompanyName = Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.VendorNameFromId(q.Company),
   68:                     Description = q.Description,
   69:                     BarCode = q.BarCode,
   70:                     Quantity = q.Quantity,
   71:                     Created = q.Created,
   72:                     Updated = q.Updated
   73:                 }).ToList();
   74:             }
   75:  
   76:             return inventoryForDataGridView;
   77:         }
   78:  
   79:         ////////////////////////////////////////////////////////////////////////////
   80:         ////////////////////////////////////////////////////////////////////////////
   81:     }
   82:  
   83:     ////////////////////////////////////////////////////////////////////////////
   84:     ////////////////////////////////////////////////////////////////////////////
   85: }