public ReturnType AddItemProp(List <ItemProp> itempropList)
 {
     try
     {
         using (AladingEntities alading = new AladingEntities(AppSettings.GetConnectionString()))
         {
             foreach (ItemProp itemprop in itempropList)
             {
                 Alading.Entity.ItemProp DBitemprop = alading.ItemProp.Where(p => p.cid == itemprop.cid && p.pid == itemprop.pid).FirstOrDefault();
                 if (DBitemprop == null)
                 {
                     alading.AddToItemProp(itemprop);
                 }
             }
             alading.SaveChanges();
             return(ReturnType.Success);
         }
     }
     catch (SqlException sex)
     {
         return(ReturnType.ConnFailed);
     }
     catch (Exception ex)
     {
         return(ReturnType.OthersError);
     }
 }
 public bool IsPropExistedCid(string cid)
 {
     try
     {
         using (AladingEntities alading = new AladingEntities(AppSettings.GetConnectionString()))
         {
             Alading.Entity.ItemProp propvalue = alading.ItemProp.Where(p => p.cid == cid).FirstOrDefault();
             if (propvalue == null)
             {
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }