Esempio n. 1
0
        /// <summary>
        /// DeletePhonesContext - Will do a soft delete (make inactive) by PhoneID
        /// </summary>
        /// <param name="_cVolunteer"></param>
        public void DeletePhonesContext(sp_Phone_DM _cPhone)
        {
            using (VolTeerEntities context = new VolTeerEntities())
            {
                var PhonesToRemove = (from n in context.tblVolPhones where n.PhoneID == _cPhone.PhoneID select n).FirstOrDefault();
                PhonesToRemove.ActiveFlg = false;
                context.sp_Vol_Phone_Update(PhonesToRemove.PhoneID, PhonesToRemove.VolID, PhonesToRemove.PhoneNbr,
                    PhonesToRemove.ActiveFlg, PhonesToRemove.PrimaryFlg);
                context.SaveChanges();

            }
        }