Beispiel #1
0
        private static bool CheckExist(IDbConnection dbConn, CRM_Book_Location item)
        {
            var checkExist = dbConn.Select <CRM_Book_Location>("Website = {0} AND Category = {1} AND Location = {2} AND Nature  = {3} AND NgayLen = {4} AND NgayXuong = {5}", item.Website, item.Category, item.Location, item.Nature, item.NgayLen, item.NgayXuong);

            if (checkExist != null && checkExist.Count > 0)
            {
                //return Json(new { success = true, data = checkExist });
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
 public ActionResult getDuplicateData(CRM_Book_Location data)
 {
     using (IDbConnection dbConn = OrmliteConnection.openConn())
     {
         var checkExist = dbConn.Select <CRM_Book_Location>("Website = {0} AND Category = {1} AND Location = {2} AND Nature  = {3} AND NgayLen = {4} AND NgayXuong = {5}", data.Website, data.Category, data.Location, data.Nature, data.NgayLen, data.NgayXuong);
         if (checkExist != null && checkExist.Count > 0)
         {
             return(Json(new { success = true, data = checkExist }));
         }
         else
         {
             return(Json(new { success = false }));
         }
     }
 }