Exemple #1
0
        /// <summary>
        /// delete by primary key
        /// </summary>
        /// <param name="keys">primary key</param>
        /// <returns>true for succesfully deleted</returns>
        public bool Delete(TAIKHOANKeys keys)
        {
            BACSIFactory BACSIService = new BACSIFactory();

            try
            {
                BACSI bacsi = BACSIService.GetAllEntities().ToList()
                              .Where(p => p.TAIKHOANID == keys.ID)
                              .FirstOrDefault();
                bacsi.TAIKHOANID = null;
                BACSIService.Update(bacsi);
            }
            catch
            {
            }
            return(_dataObject.Delete(keys));
        }
Exemple #2
0
 /// <summary>
 /// get TAIKHOAN by primary key.
 /// </summary>
 /// <param name="keys">primary key</param>
 /// <returns>Student</returns>
 public TAIKHOAN GetByPrimaryKey(TAIKHOANKeys keys)
 {
     return(_dataObject.SelectByPrimaryKey(keys));
 }