예제 #1
0
 public bool Insert(AssetPropertyDetail objUI)
 {
     bool isSuccess=true;
     try
     {
         dbContext.AssetPropertyDetails.InsertOnSubmit(objUI);
         dbContext.SubmitChanges();
     }
     catch (Exception)
     {
         isSuccess = false;
     }
     return isSuccess;
 }
예제 #2
0
        public bool Update(AssetPropertyDetail objUI)
        {
            bool isSuccess = true;
            try
            {
                AssetPropertyDetail objDb = GetById(objUI.ID.ToString());

                if (objDb != null)
                {
                    Update(objUI, objDb);
                }
                else
                {
                    isSuccess = false;
                }
            }
            catch (Exception)
            {
                isSuccess = false;
            }

            return isSuccess;
        }
예제 #3
0
 private void Update(AssetPropertyDetail objUI, AssetPropertyDetail objDb)
 {
     objDb.AssetId = objUI.AssetId;
     objDb.PropertyId = objUI.PropertyId;
     objDb.Value = objUI.Value;
     dbContext.SubmitChanges();
 }
예제 #4
0
 private void Delete(AssetPropertyDetail objUI)
 {
     if (objUI != null)
     {
         AssetPropertyDetail objDb = GetById(objUI.ID.ToString());
         if (objDb != null)
         {
             dbContext.AssetPropertyDetails.DeleteOnSubmit(objDb);
         }
     }
 }