Пример #1
0
        public ResponseRegister Insert_Registered(RegisterModel data)
        {
            ResponseRegister resp = new ResponseRegister();

            try
            {
                int rest = _IRegisterRepository.Insert_Registered(data);
                resp.status  = rest >= 0 ? StatusResponse.Success : StatusResponse.Error;
                resp.message = rest >= 0 ? "Insert Successfull." : "Insert Fail.";

                var getId = _IRegisterRepository.GetRegister(data.system_id);
                if (getId != null)
                {
                    resp.register_id = getId.register_id.ToString();
                }
                return(resp);
            }
            catch (Exception ex)
            {
                _ILogs.LogError("Insert Register Service: ", ex.Message.ToString(), ex.StackTrace);
            }
            return(null);
        }