public VendorViewModel()
        {
            Vendor_Grid = new List <VendorInfo>();

            Material_Vendor_Grid = new List <MaterialVendorInfo>();

            Vendor = new VendorInfo();

            Material_Vendor = new MaterialVendorInfo();

            Friendly_Message = new List <FriendlyMessageInfo>();

            Pager = new PaginationInfo();

            States = new List <StateInfo>();

            Nations = new List <NationInfo>();

            Filter = new Vendor_Filter();

            Material_Category = new List <MaterialCategoryInfo>();

            Is_Primary = false;

            Attribute_Code = new AttributeCodeInfo();

            Material_Category_Info = new MaterialCategoryInfo();

            Materials = new List <MaterialInfo>();
        }
Beispiel #2
0
        public List <MaterialCategoryInfo> Get_Material_Category()
        {
            List <MaterialCategoryInfo> retVal = new List <MaterialCategoryInfo>();

            DataTable dt = _sqlRepo.ExecuteDataTable(null, StoredProcedures.Get_Material_Categories_sp.ToString(), CommandType.StoredProcedure);

            if (dt != null && dt.Rows.Count > 0)
            {
                int count = 0;

                List <DataRow> drList = new List <DataRow>();

                drList = dt.AsEnumerable().ToList();

                count = drList.Count();

                foreach (DataRow dr in drList)
                {
                    MaterialCategoryInfo MaterialCategoryInfo = new MaterialCategoryInfo();

                    MaterialCategoryInfo.Material_Category_Id = Convert.ToInt32(dr["Material_Category_Id"]);

                    MaterialCategoryInfo.Material_Category_Name = Convert.ToString(dr["Material_Category_Name"]);

                    retVal.Add(MaterialCategoryInfo);
                }
            }

            return(retVal);
        }
        private MaterialCategoryInfo Get_Material_Category_Values(DataRow dr)
        {
            MaterialCategoryInfo Material_Category = new MaterialCategoryInfo();

            Material_Category.Material_Category_Id   = Convert.ToInt32(dr["Material_Category_Id"]);
            Material_Category.Material_Category_Name = Convert.ToString(dr["Material_Category_Name"]);
            return(Material_Category);
        }