Example #1
0
        public bool DeleteContract(int inputContractId)
        {
            Contract tempContract = DalTools.GetContract(inputContractId);

            if (tempContract == null)
            {
                throw new Exception("Contract with the same id not found...");
            }

            return(DataSource.ContractList.Remove(tempContract));
        }
        public bool DeleteContract(int inputContractId)
        {
            Contract tempContract = DalTools.GetContract(inputContractId);

            if (tempContract == null)
            {
                throw new Exception("Contract with the same id not found...");
            }

            bool DeleteIsSuccessful = DataSource.ContractList.Remove(tempContract);

            SaveToXML <List <Contract> >(DataSource.ContractList, ContractsPath);
            return(DeleteIsSuccessful);
        }