コード例 #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;
			}
		}
コード例 #2
0
		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;
		}
コード例 #3
0
		public void Update(Customer customer)
		{
			customer.EnsureItemIsOK();

			BllFactory.GetCustomerBLL().Update(customer);
		}
コード例 #4
0
		public void Insert(Customer customer)
		{
			customer.EnsureItemIsOK();

			BllFactory.GetCustomerBLL().Insert(customer);
		}
コード例 #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);
		}
コード例 #6
0
		public void Update(Customer customer)
		{
			DbHelper.ExecuteNonQuery("UpdateCustomer", customer);
		}
コード例 #7
0
		public void Insert(Customer customer)
		{
			DbHelper.ExecuteNonQuery("InsertCustomer", customer);
		}