Esempio n. 1
0
        public BaseOutput DeleteCALLModel(Int64 id)
        {
            CRUDOperation cRUDOperation = new CRUDOperation();
            BaseOutput    baseOutput;

            try
            {
                tbl_CALLModel _CALLModel = cRUDOperation.GetCALLModelByID(id);

                if (_CALLModel != null)
                {
                    List <tbl_CALLDetail> tbl_CALLDetails = cRUDOperation.GetCALLDetailsByModelID(_CALLModel.ID);

                    foreach (var item in tbl_CALLDetails)
                    {
                        tbl_CALLDetail tbl_CALLDetail = cRUDOperation.DeleteCALLDetail(item.ID, 0);
                    }

                    tbl_CALLModel tbl_CALLModel = cRUDOperation.DeleteCALLModel(id, 0);
                }

                return(baseOutput = new BaseOutput(true, BOResultTypes.Success.GetHashCode(), BOBaseOutputResponse.SuccessResponse, ""));
            }
            catch (Exception ex)
            {
                return(baseOutput = new BaseOutput(false, BOResultTypes.Danger.GetHashCode(), BOBaseOutputResponse.DangerResponse, ex.Message));
            }
        }