Пример #1
0
        public Result CheckInputUpdateCasecCallInfo(UpdateCasecCallInfo input)
        {
            var result = new Result();

            result.Code = 0;

            if (input == null)
            {
                result.Code        = 1;
                result.Description = "Thông tin đầu vào không đúng";
                return(result);
            }
            var infoContact = ContactRepository.GetInfo(input.ContactId);

            if (input.ContactId == null || infoContact == null)
            {
                result.Code        = 1;
                result.Description = "Contact có Id không tồn tại trong hệ thống";
                return(result);
            }
            if (input.AgentCode == null)
            {
                result.Code        = 1;
                result.Description = "AgentCode bị NULL";
                return(result);
            }
            if (input.LinkRecord == null)
            {
                result.Code        = 1;
                result.Description = "Link Record bị NULL";
                return(result);
            }
            if (input.MobilePhone == null)
            {
                result.Code        = 1;
                result.Description = "Mobile bị NULL";
                return(result);
            }
            if (input.StationId == null)
            {
                result.Code        = 1;
                result.Description = "StationId bị NULL";
                return(result);
            }
            return(result);
        }
Пример #2
0
        public Result CheckInputUpdateCasecCallInfo(UpdateCasecCallInfo input)
        {
            var result = new Result {
                Code = 0
            };

            if (input == null)
            {
                result.Code        = 1;
                result.Description = "Thông tin đầu vào không đúng";
                return(result);
            }
            if (input.ContactId < 0)
            {
                result.Code        = 1;
                result.Description = "ContactID bị NULL";
                return(result);
            }
            if (input.AgentCode == null)
            {
                result.Code        = 1;
                result.Description = "AgentCode bị NULL";
                return(result);
            }
            if (input.LinkRecord == null)
            {
                result.Code        = 1;
                result.Description = "Link Record bị NULL";
                return(result);
            }
            if (input.MobilePhone == null)
            {
                result.Code        = 1;
                result.Description = "Mobile bị NULL";
                return(result);
            }
            if (input.StationId == null)
            {
                result.Code        = 1;
                result.Description = "StationId bị NULL";
                return(result);
            }
            return(result);
        }
Пример #3
0
        public Result CheckInputUpdateCasecCallInfo(UpdateCasecCallInfo input)
        {
            var result = new Result();
            result.Code = 0;

            if (input == null)
            {
                result.Code = 1;
                result.Description = "Thông tin đầu vào không đúng";
                return result;
            }
            var infoContact = ContactRepository.GetInfo(input.ContactId);
            if (input.ContactId==null || infoContact == null)
            {

                result.Code = 1;
                result.Description = "Contact có Id không tồn tại trong hệ thống";
                return result;
            }
            if (input.AgentCode == null)
            {
                result.Code = 1;
                result.Description = "AgentCode bị NULL";
                return result;
            }
            if (input.LinkRecord==null)
            {
                result.Code = 1;
                result.Description = "Link Record bị NULL";
                return result;
            }
            if (input.MobilePhone == null)
            {
                result.Code = 1;
                result.Description = "Mobile bị NULL";
                return result;
            }
            if (input.StationId == null)
            {
                result.Code = 1;
                result.Description = "StationId bị NULL";
                return result;
            }
            return result;
        }