Beispiel #1
0
 public ActionResult <CT_DonHang> Get(int id)
 {
     try
     {
         CT_DonHang_DTO mysqlGet = new CT_DonHang_DTO();
         return(mysqlGet.getCT_DonHang(id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #2
0
 public ActionResult <IEnumerable <CT_DonHang> > Get(string id)
 {
     try
     {
         CT_DonHang_DTO mysqlGet = new CT_DonHang_DTO();
         return(mysqlGet.getCT_DonHang(id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #3
0
 public void test()
 {
     try
     {
         CT_DonHang_DTO mysqlGet = new CT_DonHang_DTO();
         mysqlGet.testTransaction();
     }
     catch (Exception ex)
     {
         throw;
     }
 }
        public string Delete(int id)
        {
            try
            {
                CT_DonHang_DTO mysqlGet = new CT_DonHang_DTO();
                return(mysqlGet.delCT_DonHang(id) == 0 ? "Không thành công" : "Thành công");
            }
            catch (Exception ex)
            {
                return(ex.Message);

                throw;
            }
        }
        public string Put(CT_DonHang ct_DH)
        {
            try
            {
                CT_DonHang_DTO mysqlGet = new CT_DonHang_DTO();
                return(mysqlGet.editCT_DonHang(ct_DH) == 0 ? "Không thành công" : "Thành công");
            }
            catch (Exception ex)
            {
                return(ex.Message);

                throw;
            }
        }