public Boolean Post([FromBody] Customer customer)
        {
            CustomerAC customerAC = new CustomerAC();
            var        affectRows = customerAC.InsertCustomer(customer);

            if (affectRows == -1)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 2
0
 public string ToText() // to write a record line in a text file
 {
     return(CustomerName + "," + CustomerAC.ToString() + "," + CustomerType.ToString() + "," + CustomerCharge.ToString());
 }
Ejemplo n.º 3
0
 public override string ToString() // overriding toString() method to read record line from file
 {
     return(CustomerName + "," + CustomerAC.ToString() + "," + CustomerType.ToString() + "," + CustomerCharge.ToString("c"));
 }