public Customer Insert(string customerCode, string name, string company
     , string phoneNo, string fax, string email, string address, string postcode
     , string state, string country, string website, DateTime? dateCreated
     , DateTime? dateModified, string createdBy, string modifiedBy, string remarks)
 {
     using (var ctx = new InventorySystemMaintenanceEntities())
     {
         Customer item = new Customer();
         if (!String.IsNullOrEmpty(customerCode))
         {
             item.CustomerCode = customerCode;
         }
         if (!String.IsNullOrEmpty(name))
         {
             item.Name = name;
         }
         if (!String.IsNullOrEmpty(company))
         {
             item.Company = company;
         }
         if (!String.IsNullOrEmpty(phoneNo))
         {
             item.PhoneNo = phoneNo;
         }
         if (!String.IsNullOrEmpty(fax))
         {
             item.Fax = fax;
         }
         if (!String.IsNullOrEmpty(email))
         {
             item.Email = email;
         }
         if (!String.IsNullOrEmpty(address))
         {
             item.Address = address;
         }
         if (!String.IsNullOrEmpty(postcode))
         {
             item.Postcode = postcode;
         }
         if (!String.IsNullOrEmpty(state))
         {
             item.State = state;
         }
         if (!String.IsNullOrEmpty(country))
         {
             item.Country = country;
         }
         if (!String.IsNullOrEmpty(website))
         {
             item.Website = website;
         }
         if (dateCreated != null)
         {
             item.DateCreated = dateCreated;
         }
         if (dateModified != null)
         {
             item.DateModified = dateModified;
         }
         if (!String.IsNullOrEmpty(createdBy))
         {
             item.CreatedBy = createdBy;
         }
         if (!String.IsNullOrEmpty(modifiedBy))
         {
             item.ModifiedBy = modifiedBy;
         }
         if (!String.IsNullOrEmpty(remarks))
         {
             item.Remarks = remarks;
         }
         ctx.AddToCustomer(item);
         ctx.SaveChanges();
         return item;
     }
 }