public static ProductModel ProductModelInitializer(BlogCRODFrontDataContext blogCRODFrontDataContext, int supplierId)
        {
            ProductModel productModel = new ProductModel();

            productModel.ProductName    = blogCRODFrontDataContext.ProductCompanyNameAdd;
            productModel.SupplierId     = supplierId;
            productModel.UnitPrice      = Decimal.Parse(blogCRODFrontDataContext.ProductPriceAdd);
            productModel.Package        = blogCRODFrontDataContext.ProductPackageTypeAdd;
            productModel.IsDiscontinued = blogCRODFrontDataContext.IsDiscounted;
            return(productModel);
        }
Beispiel #2
0
 public static void CleanTab1(BlogCRODFrontDataContext blogCRODFrontDataContext)
 {
     blogCRODFrontDataContext.ProductNameAdd        = "";
     blogCRODFrontDataContext.ProductPriceAdd       = "";
     blogCRODFrontDataContext.ProductPackageTypeAdd = "";
     blogCRODFrontDataContext.ProductCompanyNameAdd = "";
     blogCRODFrontDataContext.ProductContactNameAdd = "";
     blogCRODFrontDataContext.ProductCityNameAdd    = "";
     blogCRODFrontDataContext.ProductCountryNameAdd = "";
     blogCRODFrontDataContext.ProductPhoneFaxAdd    = "";
 }
        public static SupplierModel SupplierModelInitializer(BlogCRODFrontDataContext blogCRODFrontDataContext)
        {
            SupplierModel supplierModel = new SupplierModel();

            supplierModel.CompanyName  = blogCRODFrontDataContext.ProductCompanyNameAdd;
            supplierModel.ContactName  = blogCRODFrontDataContext.ProductContactNameAdd;
            supplierModel.ContactTitle = blogCRODFrontDataContext.ProductContactNameAdd;
            supplierModel.City         = blogCRODFrontDataContext.ProductCityNameAdd;
            supplierModel.Country      = blogCRODFrontDataContext.ProductCountryNameAdd;
            supplierModel.Phone        = blogCRODFrontDataContext.ProductPhoneFaxAdd;
            return(supplierModel);
        }