Example #1
0
        public void CaseChangeStatus(Case @case, int statusId, int supporterId)
        {
            if (@case == null)
            {
                throw new ArgumentNullException("Case cant be null");
            }
            if (@case.Id < 1)
            {
                throw new ArgumentNullException("CaseId can not be less than 1");
            }
            if (@case.Supporter?.Id != supporterId)
            {
                throw new Exception("This Supporter cant edit this case");
            }
            if (statusId < 1)
            {
                throw new ArgumentNullException("StatusId can not be less than 1");
            }
            if (supporterId < 1)
            {
                throw new ArgumentNullException("SupporterId can not be less than 1");
            }

            client.CaseChangeStatus(@case.Id, statusId, supporterId);
        }