示例#1
0
 public dynamic InsertLine([FromBody] LineProducts ln)
 {
     if (ln != null)
     {
         ln.status = 0;//enable
         _ilnproductResponsitory.SaveLineProduct(ln);
         return(Ok(new { data = "success" }));
     }
     else
     {
         return(Ok(new { data = "error" }));
     }
 }
示例#2
0
 public object deleteCatagory(int catid)
 {
     try
     {
         LineProducts newln = _ilnproductResponsitory.GetLineById(catid);
         newln.status = 1;
         _ilnproductResponsitory.UpdateLineProduct(newln);
         return(Ok(new { data = "Success" }));
     }
     catch (Exception e)
     {
         return(Ok(new { data = "error" }));
     }
 }