Exemple #1
0
        public Result CheckInputUpdateLinkSB100(UpdateLinkSB100 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 (String.IsNullOrEmpty(input.SB100))
            {
                result.Code        = 1;
                result.Description = "Link SB100 bị NULL hoặc Empty";
                return(result);
            }

            return(result);
        }
Exemple #2
0
        public Result CheckInputUpdateLinkSB100(UpdateLinkSB100 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.SB100 == null)
            {
                result.Code        = 1;
                result.Description = "Link SB100 bị NULL";
                return(result);
            }


            return(result);
        }
Exemple #3
0
        public Result CheckInputUpdateLinkSB100(UpdateLinkSB100 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 (String.IsNullOrEmpty(input.SB100))
            {
                result.Code = 1;
                result.Description = "Link SB100 bị NULL hoặc Empty";
                return result;
            }

            return result;
        }