Example #1
0
        public JsonResult ValidarCliente(string razonSocial)
        {
            string employeeName = User.Identity.GetUserId();
            bool   result       = coperations.GetCustomer(razonSocial, employeeName);

            return(Json(result));
        }
Example #2
0
 public void GetCustomerTest()
 {
     CustomerCRUD.addCustomer(88, "Joan", "Jett");
     Assert.AreEqual(CustomerCRUD.GetCustomer(88).customer_f_name, "Joan");
     Assert.AreEqual(CustomerCRUD.GetCustomerByLastName("Jett").customer_id, (88));
     Assert.AreEqual(CustomerCRUD.GetCustomerByNames("Joan", "Jett").customer_id, 88);
     CustomerCRUD.deleteCustomer(88);
 }
Example #3
0
 public void UpdateCustomerTest()
 {
     CustomerCRUD.addCustomer(77, "Ellen", "DeGeneres");
     Assert.IsTrue(CustomerCRUD.updateLastName(77, "Page"));
     Assert.AreEqual(CustomerCRUD.GetCustomer(77).customer_l_name, "Page");
     Assert.IsTrue(CustomerCRUD.updateName(77, "Elliot"));
     Assert.AreEqual(CustomerCRUD.GetCustomerByLastName("Page").customer_f_name, "Elliot");
     CustomerCRUD.deleteCustomer(77);
 }
Example #4
0
 public void GetCustomerFromDatabseTest()
 {
     Assert.AreEqual(CustomerCRUD.GetCustomer(5).customer_l_name, "Spears");
 }