public bool SaveCustomers2(Customer cus, CheckError t) { CheckError ojb = new CheckError(); using (var entity = new PetStoreEntities()) { List<Customer> cust = (from c in entity.Customers where c.Name.Equals(cus.Name) && c.LastName.Equals(cus.LastName) select c).ToList(); if (cust.Count ==0 ) if (cust.Count ==0 ) { try { entity.AddToCustomers(cus); entity.SaveChanges(); } catch (Exception t)//เออเร่อตรงนี้คะ { throw new System.Exception(t.ToString()); return false; } } else { throw new System.Exception("duplicate:" +cust.Count.ToString()); return false; } } return true;
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง