Ejemplo n.º 1
0
		public void Update(Customer customer)
		{
			Customer dest = WebSiteDB.MyNorthwind.Customers.FirstOrDefault(c => c.CustomerID == customer.CustomerID);
			if( dest != null ) {
				dest.CustomerName = customer.CustomerName;
				dest.Address = customer.Address;
				dest.ContactName = customer.ContactName;
				dest.PostalCode = customer.PostalCode;
				dest.Tel = customer.Tel;
			}
		}
		public int Test6(Category category, Product product, Customer customer, string stringVal)
		{
			TestSerializerModel3 model = new TestSerializerModel3 {
				StringVal = stringVal,
				Category = category,
				Customer = customer,
				Product = product
			};

			if( model.Equals(s_lastTestSerializerModel3) )
				return 1;
			else
				return 0;
		}
Ejemplo n.º 3
0
		public void Update(Customer customer)
		{
			customer.EnsureItemIsOK();

			BllFactory.GetCustomerBLL().Update(customer);
		}
Ejemplo n.º 4
0
		public void Insert(Customer customer)
		{
			customer.EnsureItemIsOK();

			BllFactory.GetCustomerBLL().Insert(customer);
		}
Ejemplo n.º 5
0
		public void Insert(Customer customer)
		{
			int maxId = WebSiteDB.MyNorthwind.Customers.Max(x => x.CustomerID);
			customer.CustomerID = maxId + 1;
			WebSiteDB.MyNorthwind.Customers.Add(customer);
		}
Ejemplo n.º 6
0
		public void Update(Customer customer)
		{
			DbHelper.ExecuteNonQuery("UpdateCustomer", customer);
		}
Ejemplo n.º 7
0
		public void Insert(Customer customer)
		{
			DbHelper.ExecuteNonQuery("InsertCustomer", customer);
		}